- or download this
use strict;
use Tie::File;
...
tie my @f => 'Tie::File' => $f;
print "$l: $f[$l]";
- or download this
perl -w gfarhat.pl testfile.txt 1
perl -w gfarhat.pl testfile.txt 2
...
perl -w gfarhat.pl testfile.txt 9998
- or download this
perl -nle 'BEGIN{$l=pop}print if $.==$l' testfile.txt 1