Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Check Array Elements

by NetWallah (Canon)
on Jun 06, 2012 at 22:25 UTC ( [id://974847]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    if ((my $x=grep {/ABC|GHI|MNO/}@FILES) == 3){
      print qq|Found them all\n|
    }else{
      print qq|found only $x\n|
    }
    
  2. or download this
    my @need=sort qw|ABC GHI MNO|; 
    my $flat=join "",@need; 
    ...
    if ($flat eq join( "", sort grep{m/$re/}@FILES)){
       say "Found!"
    }
    

Log In?
Username:
Password:

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

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

    No recent polls found