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

Re: Regex to replace $vars with subroutine

by friedo (Prior)
on Jun 06, 2008 at 19:53 UTC ( #690746=note: print w/ replies, xml ) Need Help??


in reply to Regex to replace $vars with subroutine

The proper way to do this is with one of the many templating modules that exist on CPAN, such as HTML::Template. But if you truly want to roll your own, you can use the /e option on your regex (see perlre) to make the replacement string executable code.


Comment on Re: Regex to replace $vars with subroutine

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2015-07-02 04:49 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 (27 votes), past polls