471,852 Members | 1,466 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,852 software developers and data experts.

Accessing ksh environment variables from Perl


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 2016

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
reply views Thread by aboka | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.