It's not a secret anymore!*
The moose likes Perl and the fly likes environment variable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Languages » Perl
Bookmark "environment variable" Watch "environment variable" New topic
Author

environment variable

anandkumar biyani
Greenhorn

Joined: Dec 06, 2011
Posts: 9
Hello,

I wanted to use path to a file in my perl script, so want to store this path in some environment variable and than use this variable as input to my script.

Can anyone help how to create environment variable and use this as a input to my script

Thanks in advance.
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11444
    
  16

anandkumar biyani wrote:Hello,

I wanted to use path to a file in my perl script, so want to store this path in some environment variable and than use this variable as input to my script.

Can anyone help how to create environment variable and use this as a input to my script

Thanks in advance.

Creating an environment variable depends on your OS.

To use an environment variable, you can just use the %ENV hash...something like



There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: environment variable