Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Compare all array values without a loop

by rjbs (Pilgrim)
on Oct 19, 2004 at 14:25 UTC ( #400540=note: print w/ replies, xml ) Need Help??


in reply to Re: Compare all array values without a loop
in thread Compare all array values without a loop

I believe the original poster wanted to know whether every value in the array equalled the given value, not whether it occurred once. Perhaps he could clarify. (Of course, now both answers are available in replies.)

rjbs


Comment on Re^2: Compare all array values without a loop
Re^3: Compare all array values without a loop
by edan (Curate) on Oct 19, 2004 at 14:41 UTC

    I think it's not very clear from the original post, but my assumption was that the poster was looking to solve the "is this value in this list" problem, so that's what I solved. I think this is a far more common problem than "is this list composed exclusively of this value"... don't you?

    --
    edan

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2014-07-26 18:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (178 votes), past polls