Advertisement

11.11.2003 at 11:08AM PST, ID: 20794648
[x]
Attachment Details

set environment variables through perl

Asked by prokni in Perl Programming Language, Server Side Includes (SSI)

Tags: environment, export

Here is my code

#!/usr/perl5/bin/perl
`test="cc"; export test`;
$cmd = "/usr/ucb/printenv > /tmp/1";
`$cmd`;

For some reason when I look at /tmp/1 file , i don't see the test variables.
If i run
test="cc"; export test`;
through shell directly and run "/usr/ucb/printenv > /tmp/1 then I can see that test is setup.
Please advice!
Start Free Trial
[+][-]11.11.2003 at 11:37AM PST, ID: 9724921

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.11.2003 at 11:46AM PST, ID: 9725013

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.11.2003 at 11:47AM PST, ID: 9725019

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Perl Programming Language, Server Side Includes (SSI)
Tags: environment, export
Sign Up Now!
Solution Provided By: arjanh
Participating Experts: 1
Solution Grade: A
 
 
[+][-]11.11.2003 at 11:50AM PST, ID: 9725054

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.11.2003 at 12:00PM PST, ID: 9725153

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32