Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^3: What does 'global' (/g) do in a regexp in this particular case?

by choroba (Canon)
on Apr 09, 2013 at 13:56 UTC ( #1027745=note: print w/ replies, xml ) Need Help??


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?

Where is the list context?

perl -E '$x = "12345"; $a = $x =~ /4/g; $b = $x =~ /1/g; say "$a,$b.\n +"'
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ


Comment on Re^3: What does 'global' (/g) do in a regexp in this particular case?
Download Code
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1027745]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (10)
As of 2015-07-29 10:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (263 votes), past polls