473,225 Members | 1,332 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

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 2053

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

Similar topics

1
by: SG | last post by:
I use the %ENV to access the environment variables. I came across the following problem. When I change the environment variable from command line, i.e let us say origianlly env var $FOO was bar1,...
0
by: Julian Blumfield | last post by:
I have a DLL written in C which needs to access environment variables set in the C# program which calls it. I have set the environment variables with SetEnvironmentVariable and can access them...
3
by: Alex | last post by:
I'm having a problem porting an ASP solution to ASPX. In the ASP solution I'm accessing a DCOM server, create sub DCOM objects and call functions from VB script on the ASP pages. The DCOM object...
2
by: ANarula | last post by:
I am running into a strange problem. I have perl script which reads the "APPDATA" environment variable, and does some work on that directory. When I a launch this script from Command Prompt, it...
3
by: Ticool | last post by:
Hello, I found this site to be very helpful in learning perl, but now I seem to be stumped and wonder if one of experts could assit me with this little problem.... On my web form I have a...
1
by: Shashank | last post by:
Hi all, I am a new member of this community. I am making a http request to a html file placed on a Apache server. On this page there is an embeded perl statement which requires reading ...
2
by: Ran Raj | last post by:
In Windows environment, I want to create/update both system and user environment variables. By default, I can access/modify the variables using Start > Control panel > System > Advanced >...
1
by: kraj123 | last post by:
Hi, How to Find ,if already a environment variable is set in hash table in perl. Actually i want to check if a environmental variable in perl script, which is present in oracle database has...
1
by: Tension | last post by:
Hi. I have a Perl script that starts a build process (plus a lot of other things). The build process needs a few environment variables set. This is done automatically in a buildEnv.bat script...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...

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.