ehm, ok! But what for???
Can't see any benefit of using /g here.
Cheers Rolf
( addicted to the Perl Programming Language)
OK at least in a loop pos works on literals...
DB<139> print scalar "a a" =~ /a/g for 1..10 1111111 # third iteration is undef than restart from beginning DB<140> print scalar "a a" =~ /a/ for 1..10 1111111111 # infinite restart
In reply to Re^2: What does 'global' (/g) do in a regexp in this particular case?
by LanX
in thread What does 'global' (/g) do in a regexp in this particular case?
by DreamT
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |