Are you by any chance calling the Perl program from within a shell script and then hoping to change the environment variable?
If so then you are SoL. As Perl is a subprocess it cannot set its parent environment. You need to use export since export is a shell builtin and not a subprocess. The closest that you can come is something like this:
In that case whatever the script prints will be inserted into the commandline and can therefore be used to set the environment of the shell.export foo=`perl script.pl`
In reply to Re (tilly) 1: environment variable
by tilly
in thread environment variable
by hotshot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |