I found this in O'rielly's Perl Cookbook. Could Someone let me know if it
illegal to copy like this. Hope this helps:

# looking for line number $DESIRED_LINE_NUMBER
$. = 0;
do { $LINE = <HANDLE> } until $. == $DESIRED_LINE_NUMBER || eof;


If you are going to be doing this a lot and the file fits into memory, read
the file into an array:

@lines = <HANDLE>;
$LINE = $lines[$DESIRED_LINE_NUMBER];





_______________________________________________________
Send a cool gift with your E-Card
http://www.bluemountain.com/giftcenter/



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to