469,325 Members | 1,464 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,325 developers. It's quick & easy.

Accessing ksh environment variables from Perl

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
0 1972

Post your reply

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

Similar topics

1 post views Thread by SG | last post: by
reply views Thread by Julian Blumfield | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Gurmeet2796 | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by listenups61195 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.