Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^3: rel2abs of a path with env

by Anonymous Monk
on Jun 07, 2021 at 16:49 UTC ( [id://11133629]=note: print w/replies, xml ) Need Help??


in reply to Re^2: rel2abs of a path with env
in thread rel2abs of a path with env

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11133629]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (1)
As of 2024-04-19 00:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found