I would expect that the following would print out all five input lines:
echo -e '55\n44\n33\n22\n11\n' | perl -n -e '@a = <>; END{ print @a; } 'Instead, the first line gets eaten. The first line always gets eaten regardless of how many numbers I send to perl.
What is the explanation for the behavior? What should be changed so that all numbers sent to perl end up in @a?
In reply to perl -n seemingly eating a line of input by mldvx4
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |