Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Interpolating backreferences in an eval

by repellent (Priest)
on Feb 11, 2009 at 20:17 UTC ( [id://743150]=note: print w/replies, xml ) Need Help??


in reply to Interpolating backreferences in an eval

eval's are evil. Templates are the way to go. How would you account for:
expand(qr/a(.)c/, 'abc', 'a$1${ print \\"haha! lets do something else +...\n\\"; 1 }c');

At least it was nice enough to give you your "abbc" :)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2025-07-20 00:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.