/!\ This web page will no longer be updated.

The perl installation at DESY

UNIX

Determination of the perl version

There are several working versions of perl available at DESY. If you need to know which perl is being used when you execute perl from the command line then you can type

perl -V

That command will display the version number and installation details like where perl modules are searched and whether e.g support for threads (USE_ITHREADS) or support for files > 2GB (USE_LARGE_FILES) is built in. Which version of perl is being used in your perl scripts is usually determined in the first line of perl scripts. If the first line reads

 #!/usr/local/bin/perl

then that binary will be used independently of what comes first in your PATH environment variable. To find out version number and installation details for that perl again, you can type in analogy

/usr/local/bin/perl -V

If you always want to use the same version of perl as determined by your PATH variable then the first line can be written as

 #!/usr/bin/env perl

Vendor provided perl version

On most computers there is a

/usr/bin/perl

This is the version that comes with the operating system. Some additional packages for perl (perl modules) that provide enhanced functionality have been installed for this version of perl.

We recommend to use the vendor provided perl in all applications. If the application requires specific modules not installed currently, then depending on the importance and availability additional packages may be installed centrally. Alternatively the modules can be installed locally by individual users/groups or a DESY maintained version of perl (see below) could be suitable.

Further perl versions available at DESY

We have installed perl 5.8.8 and non core modules on the computers maintained by DESY in a non standard location.

To get the DESY version of perl 5.8.8 when just typing

perl

you can add the proper directory to the PATH variable by issuing the command

ini perl

or more specifically

ini perl588

Alternatively you can put

 #!/opt/products/perl/5.8.8/bin/perl

as the first line in perl scripts.

perl 5.10.0 (not recommended), 5.12.2 and 5.14.2 may be available as well depending on the OS. These versions are not for general use, as the number of perl modules varies by platform and modules may be updated without further notice. On the other hand for 5.12.2 and 5.14.2 several modules (such as Moose, DBIx::Class and Catalyst) are installed that introduce new perl programming paradigms.

To make perl 5.12 or 5.14 temporarily the default version the ini command can be used as above:

ini perl512               # perl is now perl5.12
ini -d perl512            # revert to the default

Versions greater than 5.8 introduce new functionality, which is disabled by default. To enable it the perl program should contain a line containing a version number as follows:

use feature ":5.10";      # enable perl 5.10 features, e.g.make the function say available

The latest version of perl 5 as ov Nov 2012 is perl 5.16.0, which is not centrally available at DESY.

Older unmaintained versions of perl are still installed below /products/perl. Its use is highly discouraged, as either our maintained versions or the vendor version should work equally well or better.

In addition the following versions of (DESY) perl are available under /opt/products/perl

On SL3, SL4 and Solaris

/usr/local/bin/perl

is a link, which points to the DESY provided perl 5.8.2 version. For SL5 and SL6 the link points to the vendor provided /usr/bin/perl which is version 5.8.8 and 5.10.1 respectively. On 64 bit SL5 systems /usr/bin/perl is a 64 bit binary unlike the perl versions under /opt/products/perl, which are 32 bit binaries only. To access the DESY maintained version of perl on SL5 the full path or the ini command (see below) has to be used.

Installed non core perl modules

On line documentation

There is a huge amount of documentation available on line. A good starting point is

man perl 

In the man page you get pointers to more man pages devoted to individual topics. There is a man page for beginners, several tutorials, man pages containing FAQ's, the complete reference manual, a description of perl internals as well as version and OS specific details.

To get documentation on installed perl modules the command perldoc should be used as eg.

perldoc Getopt::Long

A quick lookup of core perl functions can be done using the -f switch as e.g.

perldoc -f grep

For even more uses of perldoc please consult the man page of perldoc:

perldoc perldoc

Perl 6

Since Jul 2010 a first version of perl6 is available for download. It comes with a book Using Perl 6, the local copy can be browsed here.

On SL5 you can try the Rakudo-Star version of perl 6 after the command

ini perl6

Windows XP

There are Netinstall packages for versions 5.8.1.807 and 5.8.8.820. They contain the ActiveState port of perl with additional modules. We recommend the use of 5.8.8

An interesting alternative is Strawberry perl, which comes with all the tools you need to install additional perl modules from source.

Windows 7

There is the Netinstall package ActivePerl 5.14.1401.

Documentation on the web

An excellent very complete perl documentation of the latest stable perl (5.16.0 as of Nov 2012) can be found at http://perldoc.perl.org. The 5.10.0 version documentation can be viewed locally here. This documentation is valid for perl 5.10 released in december 2007. As enhancements and incompatible changes wrt. perl 5.8.8 are usually clearly marked as such, these pages are recommended for the currently installed perl versions at DESY as well.

Perl_at_DESY (last edited 2018-07-30 13:44:19 by ManuelaBrehmer)