Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

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

by Anonymous Monk
on Apr 09, 2013 at 13:43 UTC ( #1027740=note: print w/replies, xml ) Need Help??

in reply to What does 'global' (/g) do in a regexp in this particular case?

That case is a bug


If you add  scalar in front of the match, it will match regardless of //g

If you use single pair of parens  if( ) its like scalar context

Tutorials: Context in Perl: Context tutorial, "List" Is a Four-Letter Word, Easy Reference for Contexts, Mini-Tutorial: Scalar vs List Assignment Operator

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1027740]
Discipulus is a lazy sysadmin but not lazy as marto coworkers..
[marto]: the sysadmins are actually a different 3rd party company
[Discipulus]: oh yes, outsurcing.. i remember: not as lazy as marto outsourced ones..

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (13)
As of 2017-01-24 11:11 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (204 votes). Check out past polls.