On Thu, 4 Apr 2002, James Ryley wrote:

> Hi,
> 
> I was wondering if anything ever became of the comments at
> http:[EMAIL PROTECTED]/msg00318.html?
> 
> I have an application that would benefit from double interpolation.  Of
> course I can work around it, but double interpolation would be so much
> cleaner.  Was it ever implemented, or will it be?

How 'bout:

$foo = 'def';
$bar = 'ghi';
$y = 'abc$foo$bar';
$z = eval qq{"$y"};

Of course, for security and correctness reasons, you'd probably want to:

$y =~ s/\\/\\\\/g;
$y =~ s/"!/\\"/g;

first.

Luke

Reply via email to