Think about Loose Coupling | |
PerlMonks |
Re: Double interpolation of captured substringsby ihb (Deacon) |
on Nov 17, 2004 at 10:21 UTC ( [id://408356]=note: print w/replies, xml ) | Need Help?? |
I would recommend using another way than interpolation to do what you want, but it can still be a fun exercise. If you don't want to exercise and really need the functionality, look at String::Interpolate. To show how to do what you tried to do, for educational purposes: First generate a string that is double-quoted. This string then becomes what you would use in Perl if you had a change to type it yourself. Since it now is Perl code, use eval to evaluate it i.e. interpolate the variables. ihb
See perltoc if you don't know which perldoc to read!
In Section
Seekers of Perl Wisdom
|
|