There's more than one way to do things | |
PerlMonks |
Re^3: rel2abs of a path with envby Anonymous Monk |
on Jun 07, 2021 at 16:49 UTC ( [id://11133629]=note: print w/replies, xml ) | Need Help?? |
Perl is not bash, and has different interpolation syntax. If you want to interpolate the value of an environment variable into a string in Perl, you say $ENV{USER}, not $USER. As to why you got a literal /a/b/c/$ENV{USER}, are you sure you used "/a/b/c/$ENV{USER}" and not '/a/b/c/$ENV{USER}'? The single quotes do not interpolate.
In Section
Seekers of Perl Wisdom
|
|