From the Perl documentation for system:
If there are no shell metacharacters in the argument, it is split into
words and passed directly to execvp.
So, your command is being passed in as three separate commands. Try putting quotes around it for a start. i.e.
system ('"module add openssl"');
If that does not fix it, it still could be related to the differences between running something in the shell and running something directly with exec
.
In the future, it would be good practice to share information on the exact error you are getting.
8
solved perl script error: Can’t exec “module”: No such file or directory at ./prog line 2 [closed]