Use string eval:
my $code = '$ENV{VARIABLE}/my/path'; eval $code;
Be very, very careful with this. Eval is like a Ring of Power: you can use it to get out of a bad situation, but you'll be attracting evil in the process.
"There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.
In reply to Re: String Interpolation on single quote string?
by hardburn
in thread String Interpolation on single quote string?
by cjbailey1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |