puts $_ while gets.chomp != '42'
1 2 3 42 5
1 2 3
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!