title: How can I use the Environment Modules system in Perl?
body: <p>How can one use the <a href="http://modules.sourceforge.net/" rel="nofollow">Environment Modules</a> system<sup>*</sup> in Perl? </p>
  
  <p>Running</p>
  
  <pre><code>system("load module &lt;module&gt;");
  </code></pre>
  
  <p>does not work, presumably because it forks to another environment.</p>
  
  <hr>
  
  <p>* Not to be confused with Perl modules. According to the <a href="http://en.wikipedia.org/wiki/Environment_Modules_%28software%29" rel="nofollow">Wikipedia entry</a>:</p>
  
  <blockquote>
    <p>The Environment Modules system is a tool to help users manage their Unix or Linux shell environment, by allowing groups of related environment-variable settings to be made or removed dynamically.</p>
  </blockquote>