in reply to sourcing a shell script/.profile and importing into %ENV
or something like that.my $shell = $ENV{SHELL} || '/bin/sh'; # or maybe get user's shell fro +m /etc/passwd my $home = whatever ... my $envstr = qx($shell -c '. $home/.profile; env'); # some error checking should go on here my %NEWENV = map { split /=/, $_, 2 } split /\n/, $envstr;
|
|---|