Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Comparing against multiple values

by tadman (Prior)
on Mar 18, 2002 at 19:30 UTC ( [id://152570]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    if ({map{$_=>1}($bar,$baz,$boo)}->{$foo})
    {
            print "Yes!\n";
    }
    
  2. or download this
    if (grep{$_ eq $foo} $bar, $baz, $boo)
    # ...
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (11)
As of 2024-03-28 09:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found