{"id":365,"date":"2013-04-26T12:57:36","date_gmt":"2013-04-26T12:57:36","guid":{"rendered":"http:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/?page_id=365"},"modified":"2018-06-26T09:14:20","modified_gmt":"2018-06-26T09:14:20","slug":"perl","status":"publish","type":"page","link":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/software\/applications\/perl\/","title":{"rendered":"Perl"},"content":{"rendered":"<h2>Overview<\/h2>\n<p>Perl is a programming language which is particularly good for text manipulation.<\/p>\n<p>Versions available: 5.10.1, 5.16.3, 5.20.1 and 5.20.2<\/p>\n<p>Bioperl 1.6.1 is included in the 5.16.3 install and later.<\/p>\n<h2>Restrictions on use<\/h2>\n<p>Perl is open source. All users are able to access and use it.<\/p>\n<h2>Set up procedure<\/h2>\n<p>The default version of Perl on the CSF is 5.10.1 &#8211; you do not need to load a modulefile to access it.<\/p>\n<p>To use version 5.20.2 please load the modulefile:<\/p>\n<pre class=\"in1\">\r\nmodule load apps\/gcc\/perl\/5.20.2\r\n<\/pre>\n<h2>Running the application<\/h2>\n<p>Please do not run anything other than very short simple perl programs on the login node. All computational work must be run in batch. Please see the <a href=\"\/csf2\/csf-user-documentation\/the-batch-system-sge\">CSF SGE documentation<\/a> for example job submission scripts. <\/p>\n<h2>Installing extra modules<\/h2>\n<p>If you try to run a Perl script and it fails to find a module, such as<\/p>\n<pre>\r\nCan'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&#8217;re running comes with specific different instructions).<\/p>\n<p>First you have to configure the <code>cpan<\/code> command to install into your home directory if you haven&#8217;t done so before.  Run this and hit return at the prompt:<\/p>\n<pre>\r\nperl -MCPAN -e 'mkmyconfig'\r\n<\/pre>\n<p>You also need environment variables to point to what you&#8217;ve configured.  To set that up conveniently, do the following (assuming you use the default shell):<\/p>\n<pre>\r\neval $(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>\r\ncpan 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.  The installation will currently only work with the default Perl version, not the ones requiring modules; however, the result should be usable with other versions if the <code>eval<\/code> step is done before loading the module.<\/p>\n<h2>Further info<\/h2>\n<ul>\n<li><a href=\"http:\/\/www.perl.org\/\">Perl website<\/a><\/li>\n<li><a href=\"http:\/\/www.bioperl.org\/wiki\/Main_Page\">Bioperl 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.10.1, 5.16.3, 5.20.1 and 5.20.2 Bioperl 1.6.1 is included in the 5.16.3 install and later. Restrictions on use Perl is open source. All users are able to access and use it. Set up procedure The default version of Perl on the CSF is 5.10.1 &#8211; you do not need to load a modulefile to access it. To use version 5.20.2.. <a href=\"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/software\/applications\/perl\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":31,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-365","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/365","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/comments?post=365"}],"version-history":[{"count":9,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/365\/revisions"}],"predecessor-version":[{"id":4736,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/365\/revisions\/4736"}],"up":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/31"}],"wp:attachment":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/media?parent=365"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}