By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,276 Members | 1,461 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,276 IT Pros & Developers. It's quick & easy.

Accessing ksh environment variables from Perl

P: 1
Hello,

I have a Unix shell script that has lots of env variables setting in it, e.g. :

...
export VAR1="var1"
export VAR2="var2"
...

I would like to access those from Perl using $ENV{VAR1}, but currently when I run this I'm getting an empty string. I'm not sure how to call my Ksh from within Perl. I cannot do: . ./vars.ksh (as this is the syntax for sourcing files from Unix shell and not in Perl). I know I can do: @a = `vars.ksh` and then work with @a, but that is not using $ENV.

Can someone please help ?
Jan 22 '08 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.