perlquestion
jfroebe
<p>Hi all,</p>
<p>I need to <i>source</i> a shell script file that sets various environment variables. The shell script file isn't simply a set of "export VAR=VALUE" where I can simply parse the file. The script file may be in C-Shell, Korn shell, BASH or a myriad of obscure shells depending on which environment it is running in and which user.</p>
<p><code>source some_env_file.sh
. some_env_file.sh</code></p>
<p>I'm unable to use a wrapper script that sources the file and then calls the Perl script for political reasons. <i>If you're writing a part in *shell, why do you need Perl?</i></p>
<p>So, infamous and all powerful monks of the Perl multiverse, how do I source a shell script from within a Perl script?</p>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-304796">
<p>Jason L. Froebe</p>
<p><a href="http://jfroebe.livejournal.com">Blog</a>, <a href="http://www.froebe.net/blog">Tech Blog</a></p>
</div></div>