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 reply to Re^3: rel2abs of a path with env
by Anonymous Monk
in thread rel2abs of a path with env
by ovedpo15
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |