Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

(jjhorner) Keeping a count of matches in a hash that satisfy more than 1 condition

by jjhorner (Hermit)
on Jul 19, 2000 at 17:44 UTC ( [id://23177]=note: print w/replies, xml ) Need Help??


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/

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...)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://23177]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-03-29 10:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found