PERL is a general purpose programming language.
It is especially powerful as a means of constructing
scripts that can be used as tools for specific tasks,
such as generating reports, searching or modifying text,
or handling web pages. It is interpreted, rather than compiled.
PERL can interface with C and C++ code using SWIG.

Web site:


  1. Randal Schwarz, Tom Phoenix,
    Learning PERL,
    OReilly, 2001,
    ISBN: 978-059-655-1926.


On any ARC cluster, check the installation details
by typing "module spider perl".

PERL must be loaded by a module command before it can be used.
One version of the appropriate commands for use on NewRiver is:

module purge
module load perl/5.20.2


In the following batch file, the PERL script
computes the length of the Collatz sequence for an integer n.
The script is given a sequence of values to check.

#! /bin/bash
#PBS -l walltime=00:05:00
#PBS -l nodes=1:ppn=1
#PBS -W group_list=newriver
#PBS -q open_q
#PBS -j oe


module purge
module load perl/5.20.2
#  Run several test values of N.
for n in 1 2 3 6 7 9 18 25 27 54 73 97 129
  perl $n

A complete set of files to carry out a similar process are available in