- or download this
use strict;
use warnings;
...
while ( $str =~ m/($pat1|$pat2|$pat3)/ig ) {
print "Found '$1' from pattern ", keys %+, "\n";
}
- or download this
my $pat_id;
...
while ( $str =~ m/($pat1|$pat2|$pat3)/ig ) {
print "Found '$1' from pattern pat", $pat_id, "\n";
}
- or download this
my $pat_id;
our $REGMARK;
...
while ( $str =~ m/($pat1|$pat2|$pat3)/ig ) {
print "Found '$1' from pattern ", $REGMARK, "\n";
}