in reply to multiple greps at once-- possible?
my @a = ('a'..'j'); my @b = ('j'..'z'); my $a = 0; if (ss_grep('b', \@a) and ss_grep('k', \@b)) { print "Found b and k\n"; } print "$a iterations\n"; sub ss_grep { my ($test, $aref) = @_; for (@$aref) { ++$a; return 1 if $_ eq $test; } 0; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: multiple greps at once-- possible?
by Abigail-II (Bishop) on Apr 08, 2004 at 16:49 UTC | |
by ccn (Vicar) on Apr 08, 2004 at 20:49 UTC | |
by Roy Johnson (Monsignor) on Apr 08, 2004 at 17:39 UTC |