There is a magic variable that keeps track of the current line number from the last-read filehandle. This would make your while loop a bit simpler:
$. < $lines - 2 and print while <F>
In reply to Re: Re: Print all lines in a file except the last two
by revdiablo
in thread Print all lines in a file except the last two
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |