Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Perl6ish rules in Perl5's regex engine

by demerphq (Chancellor)
on Sep 10, 2006 at 16:13 UTC ( #572230=note: print w/replies, xml ) Need Help??


in reply to Re: Perl6ish rules in Perl5's regex engine
in thread Perl6ish rules in Perl5's regex engine

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

  • Comment on Re^2: Perl6ish rules in Perl5's regex engine

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2022-12-03 15:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?