Is it possible to save the environment variable that Perl modified after the Perl program ends.
example
I want to use the PATH that my Perl script set as my unix PATH.
Can this be done?
Is it possible to save the environment variable that Perl modified after the Perl program ends.
example
I want to use the PATH that my Perl script set as my unix PATH.
Can this be done?
I don't claim to be a perl expert but I can't think of a way to do this. When perl closes it's environment and memory is discarded. If you had perl output the values you wish to use you could capture them and set them external to the perl script but this may be messy. For things like ksh or bash you would do this like:
. ScriptWhichSetsPath
But I am pretty sure this won't work for a perl script. ScriptWhichSetsPath is read line by line and executed in the current shell.
If you want to try to output the result and handle it in the script that called the perl code let me know and I can try to help you with that.
All times are GMT -7. The time now is 01:28 AM. |