Solution for the 1st exercise in chapter 8:

(I'm skipping the 2nd exercise - just a bunch of busywork)


-----------------------------------------------------------------------
input = []

while input.last != ''
  input.push gets.chomp
end

puts input.sort
-----------------------------------------------------------------------