in reply to Re: 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.
But I've tried eval several ways and can't get what I want:
$x is still uninterpolated.: my $x = 'foo'; my $y = 'The answer is $x'; my $z; eval {$z=$y}; say $z; # or say eval $y; > The answer is $x
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Invoke the Perl string interpolation engine on a string contained in a scalar variable.
by davido (Cardinal) on Jan 15, 2019 at 20:32 UTC | |
by ibm1620 (Hermit) on Jan 16, 2019 at 01:33 UTC | |
by AnomalousMonk (Archbishop) on Jan 16, 2019 at 01:37 UTC | |
|
Re^3: Invoke the Perl string interpolation engine on a string contained in a scalar variable.
by Corion (Patriarch) on Jan 15, 2019 at 20:24 UTC | |
|
Re^3: Invoke the Perl string interpolation engine on a string contained in a scalar variable.
by frazap (Monk) on Jan 17, 2019 at 14:57 UTC |