Perl

$ cd 
$ module load perl/5.26.2-gcc-8.3.0

Delete existing CPAN modules if necessray.

$ rm -rf ~/.perl ~/.cpan

Add the following command to .bashrc to avoid repeated calls:

module load perl/5.26.2-gcc-8.3.0

Log out then in to make the settings take effects.

Install Perl modules in CPAN

Synosys

$ module load perl/5.26.2-gcc-8.3.0
$ cpan
cpan> install MODULE_NAME

Examples

$ module load perl/5.26.2-gcc-8.3.0
$ cpan
cpan> install XML::LibXML
...
cpan> install Getopt::Std
...
cpan> install Encode

A SLURM job sample for Perl

Usage: sbatch job.slurm

#!/bin/bash

#SBATCH -J Perl
#SBATCH -p cpu
#SBATCH --mail-type=end
#SBATCH --mail-user=YOU@EMAIL.COM
#SBATCH -o %j.out
#SBATCH -e %j.err
#SBATCH -n 1

module load perl/5.26.2-gcc-8.3.0

perl hello.pl

Reference