in reply to source a file in Linux using perl script
Hm ... probably it's much easier, and you are just missing the obvious. ..
... please check if your environment was already set from your parent process, before trying the other workarounds.
See also %ENV
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery