Sean D. Rowe wrote at Thu, 26 Sep 2002 20:54:49 +0200:
> Right now, to get to a certain line number, I will open the file, set a for
> loop to get a line until line number is reached, and then quit. Is there a
> faster way?
>
> ex: for (my $i = 1; $i <= $LineNumber; $i++)
> {
> $Line = $FileHandle->getline;
> }
I don't know whether there's a faster way,
but there's simpler way:
use Tie::File;
tie my @line, 'Tie::File', $fname;
my $nth_line = $line[$n];
Greetings,
Janek
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]