the /g modifier makes sense only if you are matching the same string multiple timesNot entirely true. In scalar context (such as when it's the conditional of a while), it's about repeated matching. In list context, it will do the global match and return all the captures at once.
$_ = 'pig dog goggles'; my @hits = /g/g; print "@hits\n";
In reply to Re^2: regex man they are tough
by Roy Johnson
in thread regex man they are tough
by tgolf4fun
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |