in reply to Reversing of list through STDIN
use warnings; print "Enter some lines, then press Ctrl-D:\n"; # or maybe Ctrl-Z @lines = <STDIN>; @reverse_lines = reverse (@lines); print @reverse_lines; __END__ Enter some lines, then press Ctrl-D: 1 2 3 3 2 1
If you enter a palindrome, like 1,2,1, then the reverse will look the same as what you entered.
|
|---|