in reply to Chomp, Concatenation and paths

Did you mean $ENV{localappdata}?

Replies are listed 'Best First'.
Re^2: Chomp, Concatenation and paths
by Mad_Mac (Beadle) on Jun 25, 2010 at 17:22 UTC

    I don't think so ...? But maybe I don't understand. I'm not familiar with the syntax you suggested ...

      The anonymous frère likely meant to tell you that the environment is mapped bidirectionally into Perl as the %ENV hash. See perlvar about all special Perl variables.

        OK, I get it. I could use that instead of a system call. I don't see how that saves me a step, other than maybe I don't need to chomp?

      Print the contents of %ENV, and you'll see exactly what they were talking about. It contains all of your environment variables for whatever shell you're running the script in. Very useful to see what's available to your perl program.

        OK. Sorry for being a little slow. I finally had a few minutes to play around with this. This is definitely a better way to do it. Thanks for the help.