in reply to exporting environment variable to KSH
So, if "perl_script" consists of:$ FOO=`perl_script` $ export FOO
Then, after you have run the two shell commands above, you can see the new value:print "BAR\n"
There is no other way. The perl script always runs as a sub-process, and any changes to %ENV within the script are simply scrapped when that sub-process terminates -- you cannot "export" an environment variable to a parent process; you can only provide a string value, which a parent shell can then use in a variable assignment.$ echo $FOO BAR
|
|---|