diotalevi has asked for the wisdom of the Perl Monks concerning the following question:
This snippet produces a core dump. It's a simple regex with another regex embedded in a (?{}) section. Am I doing something that just isn't supposed to be done? If this is just a bug then I can report it later but I don't know that yet and thought I'd ask first.
' 1a2' =~ m/(.(?{$char = substr($_,pos(),1); print "$char "; print $char =~ m|\d| ? "digit\n" : "not digit\n"; }))+/;
__SIG__ use B; printf "You are here %08x\n", unpack "L!", unpack "P4", pack "L!", B::svref_2object(sub{})->OUTSIDE;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using regexes inside of (?{})
by pg (Canon) on Dec 08, 2002 at 18:24 UTC | |
|
Re: Using regexes inside of (?{})
by theorbtwo (Prior) on Dec 08, 2002 at 17:36 UTC | |
by diotalevi (Canon) on Dec 08, 2002 at 18:33 UTC |