I copied your code and data verbatim and it works for me.
howard$: cat input.txt 77 * 10 0 * * 0 340 141 * 40 0 * * 0 240 howard$: perl -lane 'print "$F[2]\t$F[7]" if $F[7] > 0' < input.txt 10 340 40 240
Environment is AIX, Perl 5.8.8.
In reply to Re: One-liner only checking the first line of the input file
by GotToBTru
in thread One-liner only checking the first line of the input file
by TJCooper
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |