$. is an automatic counter for the line numbers. (See perlvar)while(<>) { last if $number_of_lines && $. > $number_of_lines; ... }
In reply to Re: Finding number of lines in STDIN
by bart
in thread Finding number of lines in STDIN
by bonoboy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |