in reply to Re: Keeping a count of matches in a hash that satisfy more than 1 condition
in thread Keeping a count of matches in a hash that satisfy more than 1 condition

I believe the asker wants to come out of this with 6 new counts, so you would have to use 4 greps, and a couple of subtractions to get all of the counts needed.

J. J. Horner
Linux, Perl, Apache, Stronghold, Unix
jhorner@knoxlug.org http://www.knoxlug.org/
  • Comment on (jjhorner) Keeping a count of matches in a hash that satisfy more than 1 condition

Replies are listed 'Best First'.
RE: (jjhorner) Keeping a count of matches in a hash that satisfy more than 1 condition
by eduardo (Curate) on Jul 19, 2000 at 17:49 UTC
    very true... i didn't really want to type out all of the greps though! :) the question, as always, now becomes... which is faster, the foreach or the grep! anyone up for a benchmarking of the two? (my guess is the foreach will probably be quicker... but, i would be really curious to see what turns out...)