Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Like in hashes, do we have something like exists in arrays as well.

by Rahul6990 (Beadle)
on Jan 24, 2013 at 07:15 UTC ( [id://1015094]=note: print w/replies, xml ) Need Help??


in reply to Like in hashes, do we have something like exists in arrays as well.

This will work for you:
print "$element in @array1\n" if(grep( /$element/, @array1 )) ;
  • Comment on Re: Like in hashes, do we have something like exists in arrays as well.
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-04-19 17:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found