- or download this
while (my ($match) = m/$regex/g) {
$matched{$match} = 1;
print "$file $_";
}
- or download this
c:\@Work\Perl\monks>perl -wMstrict -le
"my $regex = qr{ \b f[eio]e \b }xms;
...
captured 'fee'
captured 'fie'
captured 'foe'
- or download this
while (m/($regex)/g and my $match = $1) {
print qq{captured '$match'};
}