On Mon May 30 05:08:27 2016, davem wrote:
is interpreted as the "last successful match". The re-eval
mechanism takes this as being the currently executing pattern,
and so you get infinite recursion.
Marking the currently executing pattern as 'last successful'
is necessary within an re-eval so that things like $1 are visible:
#prints "a"
"ab" =~ /(.)(?{ print "[$1]\n" })/;
On Mon, May 23, 2016 at 10:48:26AM -0700, Daniel Șuteu wrote:
my $str = "foo";
$str =~ /(?{ s{}{} })/;
As has been pointed out elsewhere in this ticket, an empty patternmy $str = "foo";
$str =~ /(?{ s{}{} })/;
is interpreted as the "last successful match". The re-eval
mechanism takes this as being the currently executing pattern,
and so you get infinite recursion.
Marking the currently executing pattern as 'last successful'
is necessary within an re-eval so that things like $1 are visible:
#prints "a"
"ab" =~ /(.)(?{ print "[$1]\n" })/;
--
Father Chrysostomos
---
via perlbug: queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=128225