http://www.perlmonks.org?node_id=1027744


in reply to Re: 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?

$Column is already a different string, DreamT has tripped /g in list context bug -- interpolation breaks aliasing/ causes copying -- jumps out of the bug
  • Comment on Re^2: What does 'global' (/g) do in a regexp in this particular case?

Replies are listed 'Best First'.
Re^3: What does 'global' (/g) do in a regexp in this particular case?
by choroba (Cardinal) on Apr 09, 2013 at 13:56 UTC
    Where is the list context?
    perl -E '$x = "12345"; $a = $x =~ /4/g; $b = $x =~ /1/g; say "$a,$b.\n +"'
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ