1 2 3 4 5 6 7 8 9 10 11 12 13
#!/usr/bin/ruby # # See ../README.md # # # Run as: ruby ch-1.rb < input-file # ARGF . each_line do |_| puts (_ . strip . split (/\s+/)) . reverse . join (" ") end