> -----Original Message-----
> From: Mcgregory Pinto [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 27, 2001 3:02 PM
> To: [EMAIL PROTECTED]
> Subject: Reading Environment Variables
> 
> 
> Hi all ...
> 
> I´m working in a Unix environment, and I´ve two shell scripts 
> xxx.sh and
> zzz.sh.
> This scripts change the value of environment variable GRG 
> initialized with
> 'aaa'. The first fill with 'xxx' the second fill with 'zzz'.
> I need to call this scripts in a Perl script and get the variable GRG
> changed, ex.:
> 
> my $grg = $ENV{GRG};
> print "$grg\n";     // must print 'aaa'
> system("xxx.sh")
> my $grg = $ENV{GRG};
> print "$grg\n";     // must print 'xxx'
> system("zzz.sh")
> my $grg = $ENV{GRG};
> print "$grg\n";     // must print 'zzz'
> 
> How can i do this ???
> 
> Thks
> 
> Gregory

Somebody recently mentioned a CPAN module called Shell::Source that purports
to do this very thing.

This has almost risen to the level of a FAQ :)

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to