Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: regexp and a perl function

by mickeyn (Priest)
on Feb 27, 2006 at 15:38 UTC ( #533043=note: print w/ replies, xml ) Need Help??


in reply to regexp and a perl function

use the modifier 'e' on your regex ....

s/a/substr($b,0,1)/e ; s/b/substr($b,1,1)/e ;

(definition:) it evaluates the right hand side of s/// as an expression .

Enjoy,
Mickey


Comment on Re: regexp and a perl function
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (14)
As of 2015-07-03 12:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (53 votes), past polls