From ScientificComputing
Revision as of 08:23, 27 October 2016 by Sfux (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Unlike Python and Java, Perl does not provide an interactive console. But it is possible to execute Perl command in your shell. For running the command print "Hello\n" in a shell, you need to call perl -e.

[leonhard@euler05 ~]$ module load new gcc/4.8.2 perl/5.16.3
Now run 'perl-init' to initialize your environment for Perl
[leonhard@euler05 ~]$ perl-init
[leonhard@euler05 ~]$ perl -e 'print "Hello\n";' 
[leonhard@euler05 ~]$

There are some additional Perl packages, which provide an interactive Perl console, but they are not fully supported on our clusters.