Revision 3 as of 2006-05-26 16:25:03

Clear message

The perl installation at DESY

TableOfContents

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

Installed perl versions

On most computers there is a /usr/bin/perl. This is the version installed by the vendors and not maintained by DESY. The versions maintained by us are installed under the /opt/products/perl directory.

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.

The following versions of perl are available under /opt/products/perl

On DL5, SL3 and Solaris /usr/local/bin/perl is a link, which currently points to the DESY provided perl 5.8.2 version. For SL4 the link is there as well but we plan to remove this link soon. From then on the DESY maintained version of perl will no longer be in the default PATH. To access it 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 }}}

Transition to perl 5.8.8

Currently the transition from the default perl 5.8.2 to 5.8.8 is taking place. We have already installed perl 5.8.8 and non core modules on the majority of computers.

To get our 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. We have to test our perl scripts whether they will continue to work on 5.8.8. A list of [:PerlPrograms_for_5.8.8: successfully tested scripts] is available for administrators only.

Windows XP

There is a Netinstall package for version 5.8.1.807. It contains the [http://www.activestate.com/Products/ActivePerl/ ActiveState] port of perl with additional modules.