Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Answer: How to find out if X is an element in an array?

by linuxkid (Sexton)
on Jun 22, 2012 at 21:44 UTC ( #977901=categorized answer: print w/replies, xml ) Need Help??

Q&A > arrays > How to find out if X is an element in an array? - Answer contributed by linuxkid

Try using the modern "smart match" operator:
if ( $tofind ~~ @in ) . . .

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2020-10-27 15:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (257 votes). Check out past polls.

    Notices?