in reply to Re^2: Invoke the Perl string interpolation engine on a string contained in a scalar variable.
in thread Invoke the Perl string interpolation engine on a string contained in a scalar variable.
You need to eval a string:
my($greeting,$target)=('Hello','World'); my $str = '$greeting $target'; $res=eval "qq{$str}"; print $res __END__ Hello World
|
|---|