How to access shell environment variables in Perl script

Posted by xmodulo on Dec 8, 2016 11:14 AM EDT
Xmodulo; By Dan Nanni
Mail this story
Print this story

In some cases you may want to access shell environment variables (e.g., $PATH, $PWD, $HOME, $LANG) in your Perl script. While you can pass any needed variables to your Perl script via @ARGV argument array, this is actually not needed since Perl provides a way to access all available environment variables. Let's find out how to access shell environment variables in Perl script.

Full Story

  Nav
» Read more about: Story Type: Tutorial; Groups: Developer, Linux

« Return to the newswire homepage

This topic does not have any threads posted yet!

You cannot post until you login.