in reply to Re^2: perl -n seemingly eating a line of input
in thread perl -n seemingly eating a line of input
Don't use -n, or change the way you process the lines:
echo -e '55\n44\n33\n22\n11\n' | perl -n -e 'push @a, $_; END{ print @ +a; } '
Explanation: -n makes perl loop through the input lines, and my code puts each line in turn onto the array. After all input is processed, I print out the array.
In Section
Seekers of Perl Wisdom