Do you know where your variables are? | |
PerlMonks |
Re: Interpolate $1 in: s{...}{$to}by ikegami (Patriarch) |
on Jun 24, 2010 at 22:06 UTC ( [id://846404]=note: print w/replies, xml ) | Need Help?? |
'capture 1 is $1' is a template. You need something to process that template. If you want to keep the current template format, you could use /ee aka eval EXPR (which has safety issues) or String::Interpolate (which has an unconventional interface), or you could switch to something designed to be a template (e.g. Template::Toolkit).
In Section
Seekers of Perl Wisdom
|
|