The traditional approach to pass environment variables upwards is to output a shell script and source that shell script from the calling shell:
eval "$(myvalues.pl)"
If you want to see and capture which shell variables a shell script sets up, a good approach is to run that shell script in a subshell and then output the resulting values. See for example Get default login environment and the comments to it, and also Shell::GetEnv.
In reply to Re: setenv in perl
by Corion
in thread setenv in perl
by dideod.yang
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |