z1bob
07-09-2004, 06:39 PM
Any suggestions for optimizing this code:
open(INFILE,$file);
for ($int=0; $int < $Nth; $int++){
$line=<INFILE>;
}
close(INFILE);
I would like to use the seek() function to get the $Nth line of $file
but seek(INFILE, $Nth, 0) goes to the $Nth character.
The lines of $file are not uniform length.
open(INFILE,$file);
for ($int=0; $int < $Nth; $int++){
$line=<INFILE>;
}
close(INFILE);
I would like to use the seek() function to get the $Nth line of $file
but seek(INFILE, $Nth, 0) goes to the $Nth character.
The lines of $file are not uniform length.