in reply to Re^2: Nested greps w/ Perl
in thread Nested greps w/ Perl

I'm unclear on the particulars on your math, you should note that grep -c Z does not count the number of Z's, but rather the number of lines that contain a Z. If this takes you 10 years, then you have very slow drive access. The majority of processor time for the code block I posted is consumed by the slurp and memory access unless you've done something very wrong.

#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.