Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Check Array Elements

by morgon (Priest)
on Jun 06, 2012 at 21:26 UTC ( [id://974837]=note: print w/replies, xml ) Need Help??


in reply to Check Array Elements

Simply use a hash (and strict!):
use strict; my @FILES=("ABC","DEF","GHI","JKL","MNO","PQR","STU"); my %have_file = map { $_ => 1 } @FILES; if ($have_file{ABC} and $have_file{GHI} and $have_file{MNO} ) { # do something } else { # do something else }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-25 12:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found