my $found = 0; foreach (@commands_run){ if($_ =~ m/clock/) { $found = 1; last; } } if ($found) { print "\n Test -- found pattern -- \n" } else { print "\n Test -- did not find pattern -- \n" }
In reply to Re^3: searching through array for multiple patterns
by cdarke
in thread searching through array for multiple patterns
by sqspat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |