{"id":770,"date":"2017-08-11T14:33:33","date_gmt":"2017-08-11T14:33:33","guid":{"rendered":"http:\/\/ri.itservices.manchester.ac.uk\/icsf\/?page_id=770"},"modified":"2020-10-12T09:36:58","modified_gmt":"2020-10-12T09:36:58","slug":"perl","status":"publish","type":"page","link":"https:\/\/ri.itservices.manchester.ac.uk\/icsf\/software\/applications\/perl\/","title":{"rendered":"Perl"},"content":{"rendered":"<h2>Overview<\/h2>\n<div class=\"entrytext\">\n<p>Perl is a programming language which is particularly good for text manipulation.<\/p>\n<p>Versions available: 5.20.2<\/p>\n<h2><span id=\"Restrictions_on_use\">Restrictions on use<\/span><\/h2>\n<p>Perl is open source. All users are able to access and use it.<\/p>\n<h2><span id=\"Set_up_procedure\">Set up procedure<\/span><\/h2>\n<p>There is an OS default version of Perl on each iCSF node, you may see the version via<\/p>\n<pre>perl -v<\/pre>\n<p>To load Perl v5.20.2 on the iCSF:<\/p>\n<pre>module load apps\/gcc\/perl\/5.20.2<\/pre>\n<h2><span id=\"Installing_extra_modules\">Installing extra modules<\/span><\/h2>\n<p>If you try to run a Perl script and it fails to find a module, such as<\/p>\n<pre>Can't locate Term\/ReadKey.pm in @INC ...\r\n<\/pre>\n<p>you can usually install the missing one in your home directory from the CPAN archive (unless what you\u2019re running comes with specific different instructions).<\/p>\n<p>To set this up conveniently, do the following (assuming you use the default shell):<\/p>\n<pre>eval $(perl -I$HOME\/perl5\/lib\/perl5 -Mlocal::lib)\r\n<\/pre>\n<p>You might want to add that line to your <code>.bashrc<\/code> file for future use.<\/p>\n<p>Convert the file name from the error message into a module name by replacing <code>\/<\/code> with <code>::<\/code>, and then install it similarly to (for the above case):<\/p>\n<pre>cpan Term::ReadKey\r\n<\/pre>\n<p>Hit the return key at any prompts, and it should eventually install the new module under <code>perl5<\/code> in your home directory. The procedure may take a while and print lots. The environment variable <code>PERL5LIB<\/code> needs to be set to <code>~\/perl5\/lib\/perl5<\/code> to find it; the <code>eval<\/code> step above does that. You can install multiple modules by passing the names as arguments to <code>cpan<\/code>, or just use <code>cpan<\/code> multiple times.<\/p>\n<p>The installation procedure will only work on the login nodes, but you can use the result on compute nodes as long as <code>PERL5LIB<\/code> is set correctly. Doing the installation will currently only work with the default Perl version, not the ones requiring modules, but the result should be usable with others if the <code>eval<\/code> step is done before loading the module.<\/p>\n<\/div>\n<h2><span id=\"Further_info\">Further info<\/span><\/h2>\n<ul>\n<li><a href=\"http:\/\/www.perl.org\/\">Perl website<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Overview Perl is a programming language which is particularly good for text manipulation. Versions available: 5.20.2 Restrictions on use Perl is open source. All users are able to access and use it. Set up procedure There is an OS default version of Perl on each iCSF node, you may see the version via perl -v To load Perl v5.20.2 on the iCSF: module load apps\/gcc\/perl\/5.20.2 Installing extra modules If you try to run a Perl.. <a href=\"https:\/\/ri.itservices.manchester.ac.uk\/icsf\/software\/applications\/perl\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":7,"featured_media":0,"parent":43,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-770","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/icsf\/wp-json\/wp\/v2\/pages\/770","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/icsf\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/icsf\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/icsf\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/icsf\/wp-json\/wp\/v2\/comments?post=770"}],"version-history":[{"count":10,"href":"https:\/\/ri.itservices.manchester.ac.uk\/icsf\/wp-json\/wp\/v2\/pages\/770\/revisions"}],"predecessor-version":[{"id":1078,"href":"https:\/\/ri.itservices.manchester.ac.uk\/icsf\/wp-json\/wp\/v2\/pages\/770\/revisions\/1078"}],"up":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/icsf\/wp-json\/wp\/v2\/pages\/43"}],"wp:attachment":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/icsf\/wp-json\/wp\/v2\/media?parent=770"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}