in reply to Reversing of list through STDIN
Au contraire, it seems to, indeed, reverse the order of the lines:
$ perl rev.pl Enter some lines, then press Ctrl-D: test 123 done
done 123 test
Perhaps you are interpreting the meaning of "reverse" differently. What, exactly, are you expecting for output?
(By the way, it is good practice to use warnings; use strict; in your perl programs. Doing so will save you time in the long run by catching silly mistakes while improving your coding habits.)