Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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

Replies are listed 'Best First'.
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?
marioroy running LWP::Simple on Cygwin in parallel completes in 1 second. Pre-loading essential modules is necessary only on MSWin32 Re: Crash with ForkManager on Windows.
marioroy LWP::Simple works best with Perl v5.26 on Windows. Any Perl version is fine on Cygwin and Unix.

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2017-09-23 15:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (272 votes). Check out past polls.

    Notices?