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";
In reply to Re^2: How do I set env. Variables from Perl with shell script
by Noame
in thread How do I set env. Variables from Perl with shell script
by Noame
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |