in reply to Re: How to improve speed of reading big files
in thread How to improve speed of reading big files
Update:while (<$fh>) { if (/Running|Dump|FromCB|Update/o) { push ( @lines, filterLog($_) ); } }
Is a good idea, but don't think that it works. @lines needs to get the output of filterLog(). Grep is just a simple "filter", so this would need to be a map{} otherwise looks like you always get the value of <$fh> when the value of the grep statement is "true"?push @lines, grep { /Running|Dump|FromCB|Update/o && filterLog($_) } < +$fh>;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to improve speed of reading big files
by BrowserUk (Patriarch) on Sep 18, 2009 at 08:11 UTC | |
by Marshall (Canon) on Sep 18, 2009 at 09:39 UTC | |
by BrowserUk (Patriarch) on Sep 18, 2009 at 10:24 UTC |