in reply to Re^2: Nested greps w/ Perl
in thread Nested greps w/ Perl
you should see a substantial reduction in time. In order to substantially speed it up past this, you need to avoid readline's buffering, at which point you can implement Matching in huge files.open my $C_LOC, '<', $C_LOCATIONS_FILE; while (<$C_LOC>) { chomp; $count += /\Q$SEARCH_TERM\E/ && /Z/ } close $C_LOC;
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
|
|---|