in reply to Re: Can you import ENV variables at run time?
in thread Can you import ENV variables at run time?
This should run someone's shell as a login shell regardless of what shell it is, and $env will contain the output of env which should be easy to parse.$command = sprintf('exec - %s -c env', (getpwuid($>))[8]); $ENV{'HOME'} = (getpwuid($>))[7]; $env = `$command`;
|
|---|