##
while ($text =~ m/foo(.*?)bar/g) {
print "dollarunderscore= $_ \tdollarone= $1\n";
}
####
$text =~ m/foo(.*?)bar/g; print "$_ \t$1\n";
$text =~ m/foo(.*?)bar/g; print "$_ \t$1\n";
$text =~ m/foo(.*?)bar/g; print "$_ \t$1\n";
#[... repeated as often as necessary ...]