Hi, try this, using one pattern match and try to all pattern like this
undef $/; open(IN, 'd:\temp.log'); $str = <IN>; (@str) = $str =~ m#(note;.*?)\n#gsi; local $"="\n"; print "@str"; $pass = scalar(@str); if($pass >= 3) { print "Passed"; } else { print "Failed"; }
In reply to Re: how to search 3 different patterns from a file
by gube
in thread how to search 3 different patterns from a file
by athalyes
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |