<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
>

<channel>
	<title>ITauthor &#187; Perl</title>
	<atom:link href="http://www.itauthor.com/category/perl/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.itauthor.com</link>
	<description>Stuff about technical writing and software</description>
	<lastBuildDate>Thu, 29 Jul 2010 07:27:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
<!-- podcast_generator="Blubrry PowerPress/1.0.8" mode="advanced" entry="normal" -->
	<itunes:summary>Talking about technical writing, software and technology in general. The ITauthor Podcast is an advert-free, irregularly published show by technical writers for technical writers or anyone interested in software documentation or IT generally.</itunes:summary>
	<itunes:author>Alistair Christie - ITauthor.com</itunes:author>
	<itunes:explicit>no</itunes:explicit>
	<itunes:image href="http://www.itauthor.com/images/ITauthor-PhotoLogo-300px.jpg" />
	<itunes:owner>
		<itunes:name>Alistair Christie - ITauthor.com</itunes:name>
		<itunes:email>comments@itauthor.com</itunes:email>
	</itunes:owner>
	<managingEditor>comments@itauthor.com (Alistair Christie - ITauthor.com)</managingEditor>
	<copyright>2006-2009</copyright>
	<itunes:subtitle>Talking about technical writing, software and technology in general.</itunes:subtitle>
	<itunes:keywords>itauthor, alistair christie, technology, writing, documentation </itunes:keywords>
	<image>
		<title>ITauthor &#187; Perl</title>
		<url>http://www.itauthor.com/images/ITauthor-PhotoLogo-144px.jpg</url>
		<link>http://www.itauthor.com/category/perl/</link>
	</image>
	<itunes:category text="Technology">
		<itunes:category text="Software How-To" />
		<itunes:category text="Tech News" />
		<itunes:category text="Podcasting" />
	</itunes:category>
		<item>
		<title>PHP (or Perl) one line if/then/else statements</title>
		<link>http://www.itauthor.com/2009/08/08/php-or-perl-one-line-ifthenelse-statements/</link>
		<comments>http://www.itauthor.com/2009/08/08/php-or-perl-one-line-ifthenelse-statements/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 06:53:35 +0000</pubDate>
		<dc:creator>ac</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.itauthor.com/2009/08/08/php-or-perl-one-line-ifthenelse-statements/</guid>
		<description><![CDATA[If you're toggling something between two states in PHP or Perl it's often handy to use an if/then/else one liner. In pseudocode this goes like this: &#60;if this evaluates to TRUE&#62; then &#60;parse this&#62; else &#60;parse this&#62; All you need to do is replace the &#34;then&#34; with a question mark and the &#34;else&#34; with a [...]]]></description>
			<content:encoded><![CDATA[<p>If you're toggling something between two states in PHP or Perl it's often handy to use an if/then/else one liner.</p>  <p>In pseudocode this goes like this:</p>  <p><em>&lt;<strong>if </strong>this evaluates to TRUE&gt; </em><strong>then </strong><em>&lt;parse this&gt; </em><strong>else </strong><em>&lt;parse this&gt;</em></p>  <p>All you need to do is replace the &quot;then&quot; with a question mark and the &quot;else&quot; with a colon:</p>  <p><em>&lt;<strong>if </strong>this evaluates to TRUE&gt; </em><strong>? </strong><em>&lt;parse this&gt; </em><strong>:</strong><strong> </strong><em>&lt;parse this&gt;</em></p>  <p>For example:</p>  <p><span style="color: #c0c0c0"><em>print</em>&#160; </span>$trueOrFalse ? &quot;you're telling the truth&quot; : &quot;you're lying&quot;;</p>  <p>Ignore the print command, it's not part of the if/then/else statement, it's just here to do something with the outcome of that statement.</p>  <p>The expression immediately to the left of the question mark is evaluated. The expression between the question mark and the colon is parsed if the expression evaluates to TRUE, otherwise the expression immediately to the right of the colon is parsed. So in the above example, either &quot;you're telling the truth&quot; or &quot;you're lying&quot; is printed, depending on whether $trueOrFalse is ... you guessed it ... TRUE or FALSE.</p>  <p>But perhaps a more common situation is toggling the value assigned to a variable. For example, toggling between TRUE and FALSE:</p>  <p><span style="color: #c0c0c0"><em>$trueOrFalse = </em></span>$trueOrFalse ? FALSE : TRUE;</p>  <p>Here's a practical example of the use of if/then/else one liners. There's two in this chunk of PHP. The scroll box list below the code is the kind of thing this PHP produces.</p>  <p>&lt;div style=&quot;overflow:auto; height:100px; width:300px; border:3px groove #DDD; padding:0&quot;&gt;    <br />&lt;?php     <br />&#160;&#160;&#160; $alternateLine = FALSE;     <br />&#160;&#160;&#160; while($presidentsArray) {     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; print &quot;&lt;div style=\&quot;background-color:&quot;;     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; print $alternateLine ? &quot;#F5F8F9&quot; : &quot;white&quot;;     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; print &quot;; padding-bottom: 1px\&quot;&gt; &amp;nbsp; &amp;nbsp; &lt;a href=\&quot;someURL\&quot; title=\&quot;This link goes nowhere\&quot;&gt;&quot; .     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $presidentsArray['name'] . &quot;&lt;/a&gt;&lt;/div&gt;&quot;;     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $alternateLine = $alternateLine ? FALSE : TRUE;     <br />&#160;&#160;&#160; }     <br />?&gt;     <br />&lt;/div&gt;</p>  <div style="border-bottom: #dddddd 3px groove; border-left: #dddddd 3px groove; padding-bottom: 0pt; padding-left: 0pt; width: 300px; padding-right: 0pt; height: 100px; overflow: auto; border-top: #dddddd 3px groove; border-right: #dddddd 3px groove; padding-top: 0pt">   <div style="padding-bottom: 1px; background-color: white">&#160;&#160;&#160; <a title="This link goes nowhere" href="someURL">George Washington</a></div>    <div style="padding-bottom: 1px; background-color: #f5f8f9">&#160;&#160;&#160; <a title="This link goes nowhere" href="someURL">John Adams</a></div>    <div style="padding-bottom: 1px; background-color: white">&#160;&#160;&#160; <a title="This link goes nowhere" href="someURL">Thomas Jefferson</a></div>    <div style="padding-bottom: 1px; background-color: #f5f8f9">&#160;&#160;&#160; <a title="This link goes nowhere" href="someURL">James Madison</a></div>    <div style="padding-bottom: 1px; background-color: white">&#160;&#160;&#160; <a title="This link goes nowhere" href="someURL">James Monroe</a></div>    <div style="padding-bottom: 1px; background-color: #f5f8f9">&#160;&#160;&#160; <a title="This link goes nowhere" href="someURL">John Quincy Adams</a></div>    <div style="padding-bottom: 1px; background-color: white">&#160;&#160;&#160; <a title="This link goes nowhere" href="someURL">Andrew Jackson</a></div>    <div style="padding-bottom: 1px; background-color: #f5f8f9">&#160;&#160;&#160; <a title="This link goes nowhere" href="someURL">Martin Van Buren</a></div>    <div style="padding-bottom: 1px; background-color: white">&#160;&#160;&#160; <a title="This link goes nowhere" href="someURL">William Henry Harrison</a></div>    <div style="padding-bottom: 1px; background-color: #f5f8f9">&#160;&#160;&#160; <a title="This link goes nowhere" href="someURL">John Tyler</a></div> </div>]]></content:encoded>
			<wfw:commentRss>http://www.itauthor.com/2009/08/08/php-or-perl-one-line-ifthenelse-statements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing your CVS host</title>
		<link>http://www.itauthor.com/2009/02/05/changing-your-cvs-host/</link>
		<comments>http://www.itauthor.com/2009/02/05/changing-your-cvs-host/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 12:29:48 +0000</pubDate>
		<dc:creator>ac</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[UNIX/Linux]]></category>

		<guid isPermaLink="false">http://www.itauthor.eu/2009/02/05/changing-your-cvs-host/</guid>
		<description><![CDATA[What do you do if the host name of your CVS server changes? For example, here’s my case. I checked out a whole lot of CVS modules from the repository while my laptop was on the domain. Now however, thanks to Vista SP1 not playing with an antiquated NT domain, the laptop can’t join the [...]]]></description>
			<content:encoded><![CDATA[<p>What do you do if the host name of your CVS server changes? For example, here’s my case. I checked out a whole lot of CVS modules from the repository while my laptop was on the domain. Now however, thanks to Vista SP1 not playing with an antiquated NT domain, the laptop can’t join the domain so to connect to a server I need to qualify its name with a domain. So, whereas I checked out the modules using the hostname “cvshost”, I now need to use “cvshost.mydomain.co.uk”.</p>  <p>Unfortunately, TortoiseCVS has no way to change the host names for modules you’ve already checked out. WinCVS can, supposedly, do this thanks to a macro. However, WinCVS stubbornly tells me I don’t have Python installed (I do) and therefore won’t let me use macros.</p>  <p>The solution is to just go through all the CVS “Root” files and change the host name. The Root file lives in the CVS directory at each level within a checked out module. This would be a laborious task by hand, but if you have SUA (Microsoft’s Subsystem for UNIX Applications) and Perl installed it’s easy. Just pull up a Korn shell and browse to the directory within which your checked out CVS modules live.</p>  <p>Run the following command.</p>  <p><strong>find . -name 'Root' -print0 | xargs -0 perl -pi -e 's/oldhostname/newhostname/g'</strong></p>  <p>For example, I ran the command:</p>  <p><strong>find . -name 'Root' -print0 | xargs -0 perl -pi -e 's/cvshost/cvshost.mydomain.co.uk/g'</strong></p>  <p>Which changed the Contents of the Root file from:</p>  <p><font face="Courier">:pserver:achristie@cvshost:/company/repository</font></p>  <p>to:</p>  <p><font face="Courier">:pserver:achristie@cvshost.mydomain.co.uk:/company/repository</font></p>]]></content:encoded>
			<wfw:commentRss>http://www.itauthor.com/2009/02/05/changing-your-cvs-host/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up the Perl CPAN module installer</title>
		<link>http://www.itauthor.com/2007/10/11/setting-up-the-perl-cpan-module-installer/</link>
		<comments>http://www.itauthor.com/2007/10/11/setting-up-the-perl-cpan-module-installer/#comments</comments>
		<pubDate>Thu, 11 Oct 2007 13:03:50 +0000</pubDate>
		<dc:creator>ac</dc:creator>
				<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://www.itauthor.com/wordpress/2007/10/11/setting-up-the-perl-cpan-module-installer/</guid>
		<description><![CDATA[perl -MCPAN -e 'install Collection::Module' is the standard way of installing Perl modules. The first time you run this you get asked lots of questions. For most of these you can just hit Enter to accept the default. However, you must tell it where to find the modules - i.e. the name of a CPAN [...]]]></description>
			<content:encoded><![CDATA[<p>   <p><font color="#5f5f5f"></font></p>   <font face="Courier New" size="2">perl -MCPAN -e 'install <em>Collection::Module</em>'</font></p>  <p>is the standard way of installing Perl modules.</p>  <p>The first time you run this you get asked lots of questions. For most of these you can just hit Enter to accept the default. However, you must tell it where to find the modules - i.e. the name of a CPAN mirror site. You can add several, one after the other, so that, if the first one fails, it just tries the next one in the <strong>urllist</strong>.</p>  <p>You can find a list of URLs at:</p>  <p><a title="http://www.cpan.org/SITES.html" href="http://www.cpan.org/SITES.html">http://www.cpan.org/SITES.html</a></p>  <p>Now common sense might tell you that all you need to do is copy the URL for one of the FTP sites, paste it in and Bob's your uncle. Not so, in some cases, however, because if you're sitting behind a firewall that's fussy about what it allows to be passed via FTP, then you'll have to choose an HTTP URL rather than one of the FTP ones.</p>  <p>If you've already added URLs and got failure messages when you try to install modules, try adding an HTTP one as your first choice site. To do this, go to the CPAN command prompt:</p>  <p><font face="Courier New" size="2">perl -MCPAN -eshell</font></p>  <p>Once there enter:</p>  <p><font face="Courier New" size="2">o conf</font></p>  <p>to list your configuration settings. You'll see your <strong>urllist</strong>. Now enter:</p>  <p><font face="Courier New" size="2">o conf urllist unshift <em>HTTP-URL</em></font></p>  <p>This sticks the URL at the top of the list. Depending on the age of your CPAN module and the way it's been set up, you may now have to do:</p>  <p><font face="Courier New" size="2">o conf commit</font></p>  <p>to make the change permanent, otherwise it will only last for the duration of the interactive session.</p>  <p>Now try installing the module again using:</p>  <p><font size="2"><font face="Courier New">install <em>Collection::Module</em></font></font></p>  <p>To quit out of the CPAN shell enter:</p>  <p><font face="Courier New" size="2">quit</font></p>  <p>And if installing using the CPAN installer still fails, you can always just download the package from CPAN and install it manually using <a href="http://www.itauthor.com/2007/10/03/installing-perl-modules-a-reminder/">the instructions I described recently</a>.</p>  <p>However, if you're somewhere where there's no access to the internet - or the server is locked down to prevent anything being installed from a remote source - you're going to have to use a copy of CPAN that you've downloaded previously onto a DVD or a thumb drive. For more on this have a listen to the Perlcast episode <a href="http://perlcast.com/2007/09/29/making-my-own-cpan/">Making My Own CPAN by Brian D Foy</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.itauthor.com/2007/10/11/setting-up-the-perl-cpan-module-installer/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installing Perl modules &#8211; a reminder</title>
		<link>http://www.itauthor.com/2007/10/03/installing-perl-modules-a-reminder/</link>
		<comments>http://www.itauthor.com/2007/10/03/installing-perl-modules-a-reminder/#comments</comments>
		<pubDate>Wed, 03 Oct 2007 19:13:12 +0000</pubDate>
		<dc:creator>ac</dc:creator>
				<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://www.itauthor.com/wordpress/2007/10/03/installing-perl-modules-a-reminder/</guid>
		<description><![CDATA[The simplest way to install a Perl module is to use the Perl CPAN module. Of course you have to install this first. Once you have you can do perl -MCPAN -e 'install Collection::Module' For example: perl -MCPAN -e 'install Magic::Invisibility' If the module isn't available for installation this way, but a package is available [...]]]></description>
			<content:encoded><![CDATA[<p>The simplest way to install a Perl module is to use the Perl CPAN module. Of course you have to install this first. Once you have you can do <tt>perl -MCPAN -e 'install <em>Collection</em>::<em>Module</em>'</tt></p>  <p>For example: <tt>perl -MCPAN -e 'install Magic::Invisibility'</tt></p>  <p>If the module isn't available for installation this way, but a package <em>is</em> available for download at the CPAN Web site, or elsewhere, you can usually install it the manual way. For example, following my recent post about a login banner, I recently installed the Text::Banner module on a Linux server as follows:</p>  <p><font face="Courier New" size="2">wget http://search.cpan.org/CPAN/authors/id/L/LO/LORY/Text-Banner-1.00.tar.gz      <br /></font><font face="Courier New" size="2">gunzip Text*gz      <br /></font><font face="Courier New" size="2">tar xvf Text*tar      <br /></font><font face="Courier New" size="2">cd Banner      <br /></font><font face="Courier New" size="2">cat README</font></p>  <p><em>... [I read the README file at this point]</em></p>  <p><font face="Courier New" size="2">perl Makefile.PL      <br /></font><font face="Courier New" size="2">make      <br /></font><font face="Courier New" size="2">make test      <br /></font><font face="Courier New" size="2">make install      <br /></font><font face="Courier New" size="2">perl -MText::Banner -e 1</font></p>  <p><em>[no error message means it was installed successfully]</em></p>  <p>For more detail (including details of how to install into a non-standard location) see:</p>  <p><a title="http://search.cpan.org/~jhi/perl-5.8.0/pod/perlmodinstall.pod" href="http://search.cpan.org/~jhi/perl-5.8.0/pod/perlmodinstall.pod">http://search.cpan.org/~jhi/perl-5.8.0/pod/perlmodinstall.pod</a></p>  <p>&#xA0;</p>  <p>   <hr /><strong>UPDATE </strong><em>(13/10/2007):</em></p>  <p>I always used to use the&#xA0; <font face="Courier New" size="2">perl -M<em>Collection::Module</em> -e 1 </font>way of checking whether a module was installed. Another, in some ways better, way to check is to print the version number of a module. To do this enter the command:</p>  <p><font face="Courier New" size="2">perl -e &quot;use <em>Collection::Module</em>; print $<em>Collection::Module</em>::VERSION&quot;;</font></p>  <p>For example:</p>  <p><font face="Courier New" size="2">perl -e &quot;use SOAP::Lite; print $SOAP::Lite::VERSION&quot;;</font></p>  <p>If the module is installed, this either prints the version number or, if the module hasn't been built to report its version, a blank line.</p>  <p>If the module is not installed, you get a &quot;Can't locate ...&quot; error message.</p>]]></content:encoded>
			<wfw:commentRss>http://www.itauthor.com/2007/10/03/installing-perl-modules-a-reminder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Check whether a Perl module is installed</title>
		<link>http://www.itauthor.com/2005/08/16/check-whether-a-perl-module-is-installed/</link>
		<comments>http://www.itauthor.com/2005/08/16/check-whether-a-perl-module-is-installed/#comments</comments>
		<pubDate>Tue, 16 Aug 2005 13:37:38 +0000</pubDate>
		<dc:creator>alistair at work</dc:creator>
				<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://www.itauthor.com/wordpress/?p=155</guid>
		<description><![CDATA[To check whether a Perl module is installed, use the command: perl -M&#60;module&#62; For example: perl -MCGI or: perl -M&#60;module&#62;::&#60;module&#62;::&#60;module&#62; For example: perl -MIO::Socket::UNIX If perl returns a scree of stuff beginning "Can't locate...", then the module isn't installed. If all you get is a new line, the module is installed - in which case [...]]]></description>
			<content:encoded><![CDATA[To check whether a Perl module is installed, use the command:

<strong>perl -M</strong><em>&lt;module&gt;</em>

For example:
<strong>perl -MCGI</strong>

or: 

<strong>perl -M</strong><em>&lt;module&gt;</em><strong>::</strong><em>&lt;module&gt;</em><strong>::</strong><em>&lt;module&gt;</em>

For example:
<strong>perl -MIO::Socket::UNIX</strong>

If perl returns a scree of stuff beginning "Can't locate...", then the module isn't installed.

If all you get is a new line, the module is installed - in which case press <strong>Ctrl+D</strong> to get back to the command prompt.]]></content:encoded>
			<wfw:commentRss>http://www.itauthor.com/2005/08/16/check-whether-a-perl-module-is-installed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perl Coding Standards</title>
		<link>http://www.itauthor.com/2004/08/12/perl-coding-standards/</link>
		<comments>http://www.itauthor.com/2004/08/12/perl-coding-standards/#comments</comments>
		<pubDate>Thu, 12 Aug 2004 15:13:30 +0000</pubDate>
		<dc:creator>alistair at work</dc:creator>
				<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://www.itauthor.com/wordpress/?p=81</guid>
		<description><![CDATA[A colleague pointed out this page: www.bbc.co.uk/guidelines/webdev/AppA.Perl_Coding_Standards.htm This is a set of Perl coding guidelines for developers working for the BBC. Most of what's in it is straightforward good sense. One thing I hadn't come across, and hadn't considered before is flagged up by the following paragraph: "You MUST NOT put markup language in code. [...]]]></description>
			<content:encoded><![CDATA[A colleague pointed out this page:

<a href="http://www.bbc.co.uk/guidelines/webdev/AppA.Perl_Coding_Standards.htm">www.bbc.co.uk/guidelines/webdev/AppA.Perl_Coding_Standards.htm</a>

This is a set of Perl coding guidelines for developers working for the BBC. Most of what's in it is straightforward good sense. One thing I hadn't come across, and hadn't considered before is flagged up by the following paragraph:

"You MUST NOT put markup language in code. CPAN provides several good templating modules, and a stripped-down version of an HTML::Template (called BBC::CGI::Template) can also be used. There should not be any situation where you need to put HTML or other markup into Perl code."

This caused me to go away and look at the HTML::Template module. I use HTML in my Perl CGI scripts all the time. Using templates seems like a much better idea and I intend to start using templates from now on.]]></content:encoded>
			<wfw:commentRss>http://www.itauthor.com/2004/08/12/perl-coding-standards/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introductions to Perl</title>
		<link>http://www.itauthor.com/2004/06/28/introductions-to-perl/</link>
		<comments>http://www.itauthor.com/2004/06/28/introductions-to-perl/#comments</comments>
		<pubDate>Mon, 28 Jun 2004 22:44:35 +0000</pubDate>
		<dc:creator>alistair at home</dc:creator>
				<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://www.itauthor.com/wordpress/?p=79</guid>
		<description><![CDATA[I came across an excellent, gentle introduction to the basics of the Perl programming language at: www.cs.rpi.edu/~hollingd/eiw/notes/PerlIntro/PerlIntro.html However, for anyone considering dabbling in Perl (or making a career out of it), the standard and best starter book on Perl is: Programming Perl by Larry Wall, Tom Christiansen and Randal Schwartz. Chapter 1 of this book [...]]]></description>
			<content:encoded><![CDATA[I came across an excellent, gentle introduction to the basics of the Perl programming language at:

<a href="http://www.cs.rpi.edu/~hollingd/eiw/notes/PerlIntro/PerlIntro.html">www.cs.rpi.edu/~hollingd/eiw/notes/PerlIntro/PerlIntro.html</a>

However, for anyone considering dabbling in Perl (or making a career out of it), the standard and best starter book on Perl is: 

<a href="http://iis1.cps.unizar.es/Oreilly/perl/prog/index.htm"><i>Programming Perl</i></a> by Larry Wall, Tom Christiansen and Randal Schwartz.

Chapter 1 of this book &ndash; where Larry Wall explains the basics of Perl by drawing comparison to the syntax of spoken language &ndash; is still my favourite piece of computer literature. I read it on a flight from Edinburgh to London, years ago, and I remember being utterly bowled over by the clarity of the explanation. I consider that chapter a masterpiece of computer writing because it's clear, witty, easy to read and I don't think it could have been written any better.

Another useful book, and another one that pretty much every Perl programmer has read, is:

<a href="http://iis1.cps.unizar.es/Oreilly/perl/learn/index.htm"><i>Learning Perl</i></a> by Randal Schwartz, Tom Christiansen and Larry Wall.]]></content:encoded>
			<wfw:commentRss>http://www.itauthor.com/2004/06/28/introductions-to-perl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Which Perl modules are installed</title>
		<link>http://www.itauthor.com/2004/06/13/which-perl-modules-are-installed/</link>
		<comments>http://www.itauthor.com/2004/06/13/which-perl-modules-are-installed/#comments</comments>
		<pubDate>Sun, 13 Jun 2004 18:01:24 +0000</pubDate>
		<dc:creator>alistair at home</dc:creator>
				<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://www.itauthor.com/wordpress/?p=75</guid>
		<description><![CDATA[You want to use a Perl module in a script you are writing. How do you know if it's already installed? Your first stop is to the perlmodinstall man page. At a command prompt, type: man perlmodinstall Alternatively, you can look up once of the many HTML versions of this man page (or any other [...]]]></description>
			<content:encoded><![CDATA[You want to use a Perl module in a script you are writing. How do you know if it's already installed? Your first stop is to the perlmodinstall man page. At a command prompt, type:

<b>man perlmodinstall</b>

Alternatively, you can look up once of the many HTML versions of this man page (or any other man page) on the Internet. For example: 
<a href="http://www.hmug.org/man/1/perlmodinstall.html">www.hmug.org/man/1/perlmodinstall.html</a>

The man page tells you what you need to know:

<em>First, are you sure that the module isn't already on your system?  Try "<b>perl -MFoo -e 1</b>".  (Replace "Foo" with the name of the module; for instance, "<b>perl -MCGI::Carp -e 1</b>". 

If you don't see an error message, you have the module. (If you do see an error message, it's still possible you have the module, but that it's not in your path, which you can display with "<b>perl -e "print qq(@INC)"</b>".)</em>]]></content:encoded>
			<wfw:commentRss>http://www.itauthor.com/2004/06/13/which-perl-modules-are-installed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Filehandles with forks</title>
		<link>http://www.itauthor.com/2003/12/08/filehandles-with-forks/</link>
		<comments>http://www.itauthor.com/2003/12/08/filehandles-with-forks/#comments</comments>
		<pubDate>Mon, 08 Dec 2003 08:32:26 +0000</pubDate>
		<dc:creator>alistair at home</dc:creator>
				<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://www.itauthor.com/wordpress/?p=34</guid>
		<description><![CDATA[Perl tip. How to fork a process, running a command on an existing file (e.g. decoding a coded DB) and pass the results to a filehandle, without having to save the results as a file.]]></description>
			<content:encoded><![CDATA[I was debugging a Perl script last week and wanted to know why a command in an open statement ended with a pipe. For example:

<div>open MYFILEHANDLE,"decode myDB|" or die "Failed to decode the database.";</div>

The answer is that the pipe forks a new process. This is explained here:
<a href="http://www.perldoc.com/perl5.8.0/pod/func/open.html ">http://www.perldoc.com/perl5.8.0/pod/func/open.html </a>

While looking I came across good little Perl tutorial:
<a href="http://www.geocities.com/SiliconValley/Vista/6493/perl/tutorial.html">http://www.geocities.com/SiliconValley/Vista/6493/perl/tutorial.html</a>]]></content:encoded>
			<wfw:commentRss>http://www.itauthor.com/2003/12/08/filehandles-with-forks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Generating an HTML representation of a Perl script</title>
		<link>http://www.itauthor.com/2003/11/21/generating-an-html-representation-of-a-perl-script/</link>
		<comments>http://www.itauthor.com/2003/11/21/generating-an-html-representation-of-a-perl-script/#comments</comments>
		<pubDate>Fri, 21 Nov 2003 23:13:03 +0000</pubDate>
		<dc:creator>alistair at home</dc:creator>
				<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://www.itauthor.com/wordpress/?p=20</guid>
		<description><![CDATA[I'm trying to sort out the main part of my site. It needs a proper home page for starters. So I was looking at sites and grabbing bits of HTML that I thought might be useful. In doing so it became clear that life would be easier if I could take my cut and pasted [...]]]></description>
			<content:encoded><![CDATA[I'm trying to sort out the main part of my site. It needs a proper home page for starters. So I was looking at sites and grabbing bits of HTML that I thought might be useful. In doing so it became clear that life would be easier if I could take my cut and pasted bits of HTML and run them through a "pretty printer" to reformat the code in a consistent and easier to read design. There's got to be <i>loads</i> of programs out there that'll do that, I thought - I'll just go and get one.

It turned out to be harder to find what I wanted than I thought it would be. But while looking I came across something I'd heard of, or read about, at some time, but never gone and tried before. It's a Perl reformatter called perltidy. You can get it at <a href="http://perltidy.sourceforge.net/">SourceForge</a>.

You can download a ZIP file. But you then need to "make" the install. I use Windows XP and ActiveState Perl. I tried the "make" command, but I obviously didn't have make. However, this isn't a problem. You can download <b>nmake</b> from Microsoft at <a href="http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe">http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe</a>. This is a self-extracting executable that puts the files nmake.exe and nmake.err in the same directory. All you need to do is move them to a directory that's in your PATH and you can use nmake instead of make.

The result is a program called perltidy that tidies up your Perl scripts. However, that's not of so much interest to me because I'm quite obsessive about spacing, indenting, aligning and commenting my Perl code. What's really good about perltidy is that you can run it on your Perl script with the -html flag (e.g. <b>perltidy -html myscript.pl</b>) and it outputs an HTML file that you can use to display your script on a website.

It works really sweetly and the results are great. If I had time I'd stick a page up here so that you could see what I mean, but that'll have to wait. I've got lots of other stuff to do. Like the website. I still haven't found that HTML reformatter. But perltidy is a nice find and I can thoroughly recommend it, as long as you're okay about using command-line tools.]]></content:encoded>
			<wfw:commentRss>http://www.itauthor.com/2003/11/21/generating-an-html-representation-of-a-perl-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
