Welcome to the Monastery | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
In this case there are two patterns (as your output shows). The first is the precompiled $qr and the second is that formed by concatenating the $qr into a larger pattern. You are correct that when processing the (??{$qr}) there is no recompile tho. When I said "many" I was thinking of scenarios where you would have multiple possible sub patterns (or rules), or where the (??{...}) returned a string instead of a pattern. BTW, note it does eval the code everytime.... Even if it doesnt recompile the pattern.
--- $world=~s/war/peace/g In reply to Re^2: Perl6ish rules in Perl5's regex engine
by demerphq
|
|