Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: 'g' flag with 'qr' (different commands) (updated)

by AnomalousMonk (Archbishop)
on May 30, 2016 at 04:01 UTC ( [id://1164480]=note: print w/replies, xml ) Need Help??


in reply to Re^2: 'g' flag with 'qr' (different commands) (updated)
in thread 'g' flag w/'qr'

I find it unfortunate ...

Sometimes life's like that.

So far, you've only advocated the utility and desirability of code like
    my $regex = qr{...}g;
    ...;
    ... $string =~ $regex;
in which
    ... $string =~ $regex;
would be equivalent to the current usage
    ... $string =~ /$regex/g;
given that  qr//g is not now supported.

I think you need to consider the implications of the cases raised by haukex here. These (and I'm sure many other) cases would need to be given defined behaviors. Surely, you do not intend the  qr//g feature to apply only to the  $string =~ $regex case? If so, this feature would seem to fall squarely into the "some developer's personal 'pet feature'" category.


Give a man a fish:  <%-{-{-{-<

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2024-04-19 10:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found