{"id":185,"date":"2004-03-26T08:08:44","date_gmt":"2004-03-26T12:08:44","guid":{"rendered":"http:\/\/scruss.com\/blog\/?p=185"},"modified":"2004-03-26T08:08:44","modified_gmt":"2004-03-26T12:08:44","slug":"touching-the-camel","status":"publish","type":"post","link":"https:\/\/scruss.com\/blog\/2004\/03\/26\/touching-the-camel\/","title":{"rendered":"Touching the camel"},"content":{"rendered":"<p><a href=\"http:\/\/redchocolate.ca\/\">Paul<\/a> asked about getting back<br \/>\nto maintaining some Perl code after an absence of a few years. Since I<br \/>\ndo a lot of Perl, here are some of the time-savers that I can&#8217;t live<br \/>\nwithout:<\/p>\n<ul>\n<li><a href=\"http:\/\/search.cpan.org\/\">search.cpan.org<\/a> allows you<br \/>\nto search all the publicly-available modules on <a\nhref=\"http:\/\/cpan.org\/\">CPAN<\/a>. There are few problems in Perl that<br \/>\nhaven&#8217;t been at least partially solved by a CPAN module. At the very<br \/>\nleast, make sure any web scripts use CGI.pm appropriately. I still see<br \/>\nhand-rolled code that parses CGI arguments, never as well as <a\nhref=\"http:\/\/search.cpan.org\/search?query=CGI\">CGI.pm<\/a> would<br \/>\ndo.<\/li>\n<li><a href=\"http:\/\/www.perlmonks.org\/\">PerlMonks<\/a> is where you go<br \/>\nto ask about your Perl problems, and find solutions. It&#8217;s worth<br \/>\nlearning a bit about the search options so you don&#8217;t ask a very old<br \/>\nquestion again. This is <a\nhref=\"http:\/\/www.perlmonks.org\/index.pl?node_id=206025\">me<\/a> on<br \/>\nPerlMonks, incidentally.<\/li>\n<li>The Perl FAQ,<br \/>\nincluded in the documentation as <code>\/perlfaq[1-9]?\/<\/code>. The Perl Cookbook is<br \/>\nbasically just the Perl FAQ on paper. Nice to hold, but you can&#8217;t<br \/>\nsearch it the same way you can with <code>perldoc -q &lt;keyword&gt;<\/code>.<\/li>\n<\/ul>\n<p>I would always advise Perl programmers to <strong>be<br \/>\nlazy<\/strong>. Not slothful, but spend a little time seeing if someone<br \/>\nhas solved your problem before. Thus you can turn many routine<br \/>\nprogramming jobs into a <em>small matter of configuration<\/em>.<\/p>\n<p>I would also advise learning some of the idiomatic Perl tricks,<br \/>\nlike &#8216;<code>... or die ...<\/code>&#8216;, inline<br \/>\n<code>if<\/code>\/<code>unless<\/code>, careful use of<br \/>\n<code>undef<\/code>, and list operators like <code>map<\/code> and<br \/>\n<code>grep<\/code>. It&#8217;s not just because you&#8217;re likely to meet them in<br \/>\neveryday code, but they&#8217;re very convenient. Once you start to miss<br \/>\nthem in other languages, you&#8217;ll know that you are <em>One Of<br \/>\nUs<\/em>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Paul asked about getting back to maintaining some Perl code after an absence of a few years. Since I do a lot of Perl, here are some of the time-savers that I can&#8217;t live without: search.cpan.org allows you to search all the publicly-available modules on CPAN. There are few problems in Perl that haven&#8217;t been [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[7,2],"tags":[187],"class_list":["post-185","post","type-post","status-publish","format-standard","hentry","category-computers-suck","category-goatee-stroking-musing-or-something","tag-perl"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pQNZZ-2Z","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/185","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/comments?post=185"}],"version-history":[{"count":0,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/185\/revisions"}],"wp:attachment":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/media?parent=185"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/categories?post=185"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/tags?post=185"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}