How Do I Set Environment Variables In Perl Programs

How Do I Set Environment Variables In Perl Programs


  • 18 Jan, 2012

    you can just do something like this:$ENV{'PATH'} = '...';As you may remember, "%ENV" is a special hash in Perl that contains the value of all your environment variables.Because %ENV is a hash, you can set environment variables just as you'd set the value of any Perl hash variable. Here's how you can set your PATH variable to make sure the following four directories are in your path::$ENV{'PATH'} = '/bin:/usr/bin:/usr/local/bin:/home/yourname/bin';

    Comments Received:
    Please give your suggestions and feedback:

2009-2016 downloadmela.com. All rights reserved.