Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: (ar0n) Re (2): Fastest way to compare multiple variables?

by MeowChow (Vicar)
on May 15, 2001 at 23:03 UTC ( #80674=note: print w/replies, xml ) Need Help??


in reply to (ar0n) Re (2): Fastest way to compare multiple variables?
in thread Fastest way to compare multiple variables?

if ( !grep $_ != $list[0], @list ) { &do_something; }
... probably clearer, definitely probably faster :)
   MeowChow                                   
               s aamecha.s a..a\u$&owag.print

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://80674]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2017-02-23 05:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (339 votes). Check out past polls.