The $. stores the current line number of the last filehandle accessed: see here.$ perl -ne 'print if ($. == 4)' test.txt Line 4 $ perl -ne 'print if ( 4 < $. and $. < 11)' test.txt Line 5 ... Line 10
CU
Robartes-
In reply to Re: write exact lines of file
by robartes
in thread write exact lines of file
by b1rd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |