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

Re: testing more than one item for equality

by Hofmator (Curate)
on Oct 18, 2006 at 11:40 UTC ( #579040=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    if (grep { $_ eq $item3 } ($item1, $item2)) {
      #do something
    }
    
  2. or download this
    if ($item1 eq $item3 or $item2 eq $item3) { ... }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2023-06-06 13:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you go to conferences?






    Results (26 votes). Check out past polls.

    Notices?