in reply to Re^2: Matching in huge files
in thread Matching in huge files
Yep, it is very fast, but why is that better than this:
?
Thanks,
Tamas
open(F, "<", $file) or die "$file: $!"; binmode(F); undef $/; # switch off end-of-line separating # read file in large chunks while (<F>) { while ( m/$re/oigsm ) { print "$1\n"; } } $/ = '\n'; # switch back to line mode close(F);
?
Thanks,
Tamas
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Matching in huge files
by dws (Chancellor) on Jul 07, 2006 at 00:16 UTC | |
Re^4: Matching in huge files
by JadeNB (Chaplain) on Sep 05, 2008 at 18:25 UTC |
In Section
Code Catacombs