in reply to Check Array Elements
if ((my $x=grep {/ABC|GHI|MNO/}@FILES) == 3){ print qq|Found them all\n| }else{ print qq|found only $x\n| }
my @need=sort qw|ABC GHI MNO|; my $flat=join "",@need; my $re="\\b" . join( "|",@need)."\\b"; if ($flat eq join( "", sort grep{m/$re/}@FILES)){ say "Found!" }
I hope life isn't a big joke, because I don't get it.
-SNL
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Check Array Elements
by morgon (Priest) on Jun 06, 2012 at 22:41 UTC | |
by NetWallah (Canon) on Jun 07, 2012 at 05:56 UTC | |
by stevieb (Canon) on Jun 07, 2012 at 06:50 UTC |