I think you're right - I found a tip on another list that answers a similar query, although that concerned a bash script rather than Perl.
It turns out that if you _run_ a bash script that does export VARIABLE then it does not persist - only works for children.
However if instead you _source_...
Thanks - just tried it with this result:
sh: -c: line 1: syntax error near unexpected token `'WORLD=earth''
sh: -c: line 1: `export('WORLD=earth')'
I guess this means that the shell is complaining - but does the "sh" mean that it's not bash?
I wonder if this is the reason for my...
I'm trying to set some ENV variables so that other programs can use them.
Setting via %ENV doesn't work after the Perl script (child) has terminated.
So I thought the Shell module should help - apparently this allows shell commands to be run.
Although something like this (example from perldoc)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.