why not read the file line by line and then simply match each line with
/$something/, disgarding any lines which do not match /$something/.

If you wanted to could push all matching lines into and array.

Cheers

Paul


On Fri, 2003-09-26 at 18:52, Juris wrote:
> I have one small problem!
> HowTo read from large text file text in binary mode?
> 
> if i want read all file, i use this code:
> 
> my (@LOG_FILE);
> open (FL, "/var/log/maillog");
> @LOG_FILE=<FL>;
> close (FL);
> #After this code execution file contents stored in array @LOG_FILE
> @LOG_FILE=grep /$something/, @LOG_FILE
> 
> I not want read all file string by struing - it's so slowly, if file is 
> large and contains more than 1000000 records!
> I need read each 500000 bytes, but how?
> Please, help!
> 
> 
> -- 
> With best regards,
> Juris


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

Reply via email to