![]() |
|
Perl-Sensitive Sunglasses | |
PerlMonks |
Re: What does 'global' (/g) do in a regexp in this particular case?by hdb (Monsignor) |
on Apr 09, 2013 at 13:37 UTC ( #1027737=note: print w/replies, xml ) | Need Help?? |
From perlretut: "The modifier //g stands for global matching and allows the matching operator to match within a string as many times as possible. In scalar context, successive invocations against a string will have //g jump from match to match, keeping track of position in the string as it goes along. " If both your matching operators have /g, they become part of one operation, which can consume "Property" only once.
In Section
Seekers of Perl Wisdom
|
|