How can one use the Environment Modules system* in Perl?
Running
system(\"load module \");
does not work,
It looks like the Perl module Env::Modulecmd will do what you want. From the documentation:
Env::Modulecmdprovides an automated interface tomodulecmdfrom Perl. The most straightforward use ofEnv::Modulecmdis for loading and unloading modules at compile time, although many other uses are provided.
Example usage:
use Env::Modulecmd { load => 'foo/1.0' };