$test = 'the quick brown fox';
$_ = 8;
if ( $test =~ m/^.*(??{print "$_\n"})/ ) {
print "**$_**\n";
}
####
the quick brown fox
the quick brown fox
the quick brown fox
the quick brown fox
the quick brown fox
the quick brown fox
the quick brown fox
the quick brown fox
the quick brown fox
the quick brown fox
the quick brown fox
the quick brown fox
the quick brown fox
the quick brown fox
the quick brown fox
the quick brown fox
the quick brown fox
the quick brown fox
the quick brown fox
the quick brown fox
####
$test = 'the 1st quick brown fox';
$_ = 8;
if ( $test =~ m/^.*(??{print "$_\n"})/ ) {
print "**$_**\n";
}
####
the 1st quick brown fox
the 1st quick brown fox
the 1st quick brown fox
the 1st quick brown fox
the 1st quick brown fox
the 1st quick brown fox
the 1st quick brown fox
the 1st quick brown fox
the 1st quick brown fox
the 1st quick brown fox
the 1st quick brown fox
the 1st quick brown fox
the 1st quick brown fox
the 1st quick brown fox
the 1st quick brown fox
the 1st quick brown fox
the 1st quick brown fox
the 1st quick brown fox
the 1st quick brown fox
the 1st quick brown fox
**8**