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: <%-{-{-{-<
|
|---|