Perl
Perl
Perl 5 [1] is a highly capable, feature-rich programming language with over 27 years of development. Perl 5 runs on over 100 platforms from portables to mainframes and is suitable for both rapid prototyping and large scale development projects.
Installed Versions
For Rider and Markov, perl is available as part of the operating system. A more recent version is available through the 'base' module. There is not a dedicated perl module at this time.
[hpc4 ~]$ which perl
/usr/bin/perl # path to system perl
[hpc4 ~]$ module load base
[hpc4 ~]$ which perl
/usr/local/base/8.0/bin/perl # path to base module perl
Running Perl in HPC
Interactive Job
Request a compute node
srun --pty bash
Command Prompt:
perl -del
DB<1> print "hello world"
hello world
DB<2> q
Command Line:
Check if GD Module is installed. If not available, it will throw "Can't locate <module>.pm in @INC ..."
perl -e "use GD"
Run the perl script:
create a file "hello.pl" with a following content:
print("Greeting is Hello, world\n");
Execute
perl hello.pl
output:
Greeting is Hello, world
Installing Local Perl Modules
There are a few methods for installing Perl modules to your home directory and we have documented them under the software installation guide for Perl and Modules.
Local Perl Installation
If substantial additional packages are required, a full Perl installation may be performed to the local directory, following the software installation guide for Perl and Modules.
References:
[1] Perl Home