in reply to Re^2: What does 'global' (/g) do in a regexp in this particular case?
in thread What does 'global' (/g) do in a regexp in this particular case?
perl -E '$x = "12345"; $a = $x =~ /4/g; $b = $x =~ /1/g; say "$a,$b.\n +"'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: What does 'global' (/g) do in a regexp in this particular case?
by Anonymous Monk on Apr 09, 2013 at 14:10 UTC |