in reply to Re: How do I set env. Variables from Perl with shell script
in thread How do I set env. Variables from Perl with shell script
my $HOME = $ENV{HOME}; my $shell = shift || (getpwuid($<))[8]; my $command = "${HOME}/.project_setup"; my @setup = `$shell -c \". $command ; env\"`; foreach (@setup) { if (/^(\S+)=(.*)$/) { my ($key, $value) = ($1, $2); #print ("$key => $value\n"); $ENV{$key} = $value; } } print "$ENV{INCLUDE}\n";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: How do I set env. Variables from Perl with shell script
by linneighborhood (Initiate) on Nov 06, 2009 at 10:51 UTC | |
by Anonymous Monk on Nov 06, 2009 at 11:16 UTC | |
Re^3: How do I set env. Variables from Perl with shell script
by Anonymous Monk on Jun 01, 2009 at 15:15 UTC | |
by Corion (Patriarch) on Jun 01, 2009 at 15:20 UTC |