<?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/"
	>

<channel>
	<title>Notes &#187; perl</title>
	<atom:link href="http://alexpb.com/notes/articles/tag/perl-programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://alexpb.com/notes</link>
	<description></description>
	<lastBuildDate>Mon, 26 Jul 2010 01:27:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Excel Deletes Leading 0s When Opening a CSV File</title>
		<link>http://alexpb.com/notes/articles/2010/07/01/excel-deletes-leading-0s-when-opening-a-csv-file/</link>
		<comments>http://alexpb.com/notes/articles/2010/07/01/excel-deletes-leading-0s-when-opening-a-csv-file/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 21:43:30 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[excel]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[csv]]></category>
		<category><![CDATA[import]]></category>
		<category><![CDATA[zero]]></category>

		<guid isPermaLink="false">http://alexpb.com/notes/?p=746</guid>
		<description><![CDATA[If you want Excel to keep a field&#8217;s leading zeros when opening a CSV file using Excel, you can change it to =&#8221;value&#8221;. For example, if you have a row with 4 values that looks like this: test,00016102,test,test Just change it to: test,=&#34;00016102&#34;,test,test]]></description>
			<content:encoded><![CDATA[<p>If you want Excel to keep a field&#8217;s leading zeros when opening a CSV file using Excel, you can change it to =&#8221;value&#8221;.</p>
<p>For example, if you have a row with 4 values that looks like this:</p>
<pre class="brush: plain;">test,00016102,test,test</pre>
<p></p>
<p>Just change it to:</p>
<pre class="brush: plain;">test,=&quot;00016102&quot;,test,test</pre>
]]></content:encoded>
			<wfw:commentRss>http://alexpb.com/notes/articles/2010/07/01/excel-deletes-leading-0s-when-opening-a-csv-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Check String for Non-ASCII Characters in Perl</title>
		<link>http://alexpb.com/notes/articles/2008/11/01/check-string-for-non-ascii-characters-in-perl/</link>
		<comments>http://alexpb.com/notes/articles/2008/11/01/check-string-for-non-ascii-characters-in-perl/#comments</comments>
		<pubDate>Sat, 01 Nov 2008 20:19:21 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[perl]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ascii]]></category>
		<category><![CDATA[byte string]]></category>
		<category><![CDATA[pure]]></category>
		<category><![CDATA[string]]></category>
		<category><![CDATA[valid]]></category>

		<guid isPermaLink="false">http://alexpb.com/notes/?p=263</guid>
		<description><![CDATA[if ( $string =~ /[[:^ascii:]]/ ) { print "String contains characters that are NOT pure ASCII"; } else { print "Everything is good, string/pure is valid ASCII."; } E.G.: If it contains bytes > 127, it&#8217;s not valid ASCII.]]></description>
			<content:encoded><![CDATA[<p><code><br />
if ( $string =~ /[[:^ascii:]]/ ) {<br />
   print "String contains characters that are NOT pure ASCII";<br />
}<br />
else {<br />
  print "Everything is good, string/pure is valid ASCII.";<br />
}<br />
</code></p>
<p>E.G.: If it contains bytes > 127, it&#8217;s not valid ASCII. </p>
]]></content:encoded>
			<wfw:commentRss>http://alexpb.com/notes/articles/2008/11/01/check-string-for-non-ascii-characters-in-perl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Active Perl&#8217;s Package Manager: ppm</title>
		<link>http://alexpb.com/notes/articles/2008/08/06/active-perls-package-manager-ppm/</link>
		<comments>http://alexpb.com/notes/articles/2008/08/06/active-perls-package-manager-ppm/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 02:06:54 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[perl]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://alexpb.com/notes/?p=138</guid>
		<description><![CDATA[It allows you to get Perl pre-compiled packages. You can avoid installing a C compiler which is needed for some packages (KinoSearch for example). http://aspn.activestate.com/ASPN/Downloads/ActivePerl/PPM/ Alternate packages repositories: http://cpan.uwinnipeg.ca/PPMPackages/10xx/]]></description>
			<content:encoded><![CDATA[<p>It allows you to get Perl pre-compiled packages. You can avoid installing a C compiler which is needed for some packages (KinoSearch for example).</p>
<p><a href="http://aspn.activestate.com/ASPN/Downloads/ActivePerl/PPM/">http://aspn.activestate.com/ASPN/Downloads/ActivePerl/PPM/</a></p>
<p>Alternate packages repositories:<br />
<a href="http://cpan.uwinnipeg.ca/PPMPackages/10xx/">http://cpan.uwinnipeg.ca/PPMPackages/10xx/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://alexpb.com/notes/articles/2008/08/06/active-perls-package-manager-ppm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free Link Checker</title>
		<link>http://alexpb.com/notes/articles/2007/10/06/free-link-checker/</link>
		<comments>http://alexpb.com/notes/articles/2007/10/06/free-link-checker/#comments</comments>
		<pubDate>Sun, 07 Oct 2007 02:01:04 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[internet]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://alexpb.com/notes/articles/2007/10/06/free-link-checker/</guid>
		<description><![CDATA[Find bad links, dead links or 404s using churls_web.pl. The script displays a &#8220;.&#8221; for each good link and displays the error code and message for each bad link.]]></description>
			<content:encoded><![CDATA[<p>Find bad links, dead links or 404s using <a href="http://alexpb.com/notes/churls_web.pl">churls_web.pl</a>.</p>
<p>The script displays a &#8220;.&#8221; for each good link and displays the error code and message for each bad link.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexpb.com/notes/articles/2007/10/06/free-link-checker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install a Perl Module on a Shared Host</title>
		<link>http://alexpb.com/notes/articles/2007/09/25/installing-perl-module-on-a-shared-host/</link>
		<comments>http://alexpb.com/notes/articles/2007/09/25/installing-perl-module-on-a-shared-host/#comments</comments>
		<pubDate>Tue, 25 Sep 2007 21:16:26 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://alexpb.com/notes/articles/2007/09/25/installing-perl-module-on-a-shared-host/</guid>
		<description><![CDATA[Make a directory where you will install the modules, eg: $ mkdir ~/perl Get and Install the Module Manually Download, extract and change the current directory to the newly created module&#8217;s directory and than make and install the module using the following commands: $ perl Makefile.PL PREFIX=/home/your_username/perl/ $ make $ make install Automatically $ cpan [...]]]></description>
			<content:encoded><![CDATA[<ol>
<li>Make a directory where you will install the modules, eg:</li>
<p>    <code>$ mkdir ~/perl </code></p>
<li>Get and Install the Module
<ul>
<li><strong>Manually</strong>
<ol>
<li>Download, extract and change the current directory to the newly created module&#8217;s directory and than make and install the module using the following commands:</li>
<p>                    <code>$ perl Makefile.PL PREFIX=/home/your_username/perl/<br />
                    $ make<br />
                    $ make install</code>
          </ol>
</li>
<li><strong>Automatically</strong>
<ol>
<li><code>$ cpan force install Module::Name</code></li>
<p>                OR</p>
<li><code>$ perl -MCPAN -e 'install Module::Name'</code></li>
</ol>
</li>
</ul>
</li>
<li>Make sure Perl can find your modules</li>
<p>Add this line in each of your Perl scripts (change perl version accordingly):</p>
<p>    <code>use lib '/home/your_username/perl/lib/perl5/site_perl/5.8.7';</code> </p>
<p>OR rather than editing all your Perl scripts, in your cgi-bin/.htaccess file:</p>
<p>    <code>SetEnvIf  Request_URI  "^/cgi-bin/" PERL5LIB=/home/user/perl/lib/perl5/site_perl/5.8.7:/home/user/perl/lib/perl5/site_perl/5.8.7/site_perl</code></p>
<p>OR in your .bash_profile:</p>
<p>    <code>export PERL5LIB=/home/user/perl/lib/perl5/site_perl/5.8.7:/home/user/perl/lib:/home/user/perl/lib/perl5:/home/user/perl/lib/perl5/site_perl</code></p>
<p>It won&#8217;t be effective until you log back in, if you want to make it effective in your current session, just type that line in your command prompt.</p>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://alexpb.com/notes/articles/2007/09/25/installing-perl-module-on-a-shared-host/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extract Data From Wordnet</title>
		<link>http://alexpb.com/notes/articles/2007/09/25/extract-data-from-wordnet/</link>
		<comments>http://alexpb.com/notes/articles/2007/09/25/extract-data-from-wordnet/#comments</comments>
		<pubDate>Tue, 25 Sep 2007 20:13:07 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[perl]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://alexpb.com/notes/articles/2007/09/25/extract-data-from-wordnet/</guid>
		<description><![CDATA[Get a word&#8217;s definition(s), synonyms and hyponyms (related words) using perl and WordNet. The word must be specified as a command line argument, but the script could easily be modified to use an html parameter. What you need: Download and Install WordNet Download and Install this Perl interface by Jason Rennie Download this Perl Script: [...]]]></description>
			<content:encoded><![CDATA[<p>Get a word&#8217;s definition(s), synonyms and hyponyms (related words) using perl and WordNet.  The word must be specified as a command line argument, but the script could easily be modified to use an html parameter.</p>
<p>What you need:</p>
<ol>
<li>Download and Install <a href="http://wordnet.princeton.edu/ ">WordNet</a></li>
<li>Download and Install this <a href="http://www.ai.mit.edu/~jrennie/WordNet/">Perl interface</a> by <a href="http://www.ai.mit.edu/%7Ejrennie/">Jason Rennie</a></li>
<li>Download this <a href='http://alexpb.com/notes/wp-content/uploads/2007/09/wordnet1.zip' title='Extract Data From Wordnet'>Perl Script:</a></li>
<li>usage: perl wordnet.pl word</li>
</ol>
<p><code>#!/usr/bin/perl -w</p>
<p>  use strict;<br />
  use warnings;<br />
  use WordNet::QueryData;<br />
  my $word = $ARGV[0] or exit(usage());<br />
  my $wn = WordNet::QueryData->new;<br />
  my @senses = $wn->querySense("$word#n", "glos");<br />
  my $i = 1;<br />
  foreach my $sense(@senses) {<br />
    my $temp_sense    = join(",", $wn->querySense($sense, "glos"));<br />
    my $temp_synset   = join(",", $wn->querySense($sense, "syns"));<br />
    my $temp_hyponyms = join(",", $wn->querySense($sense, "hypo"));<br />
    $temp_synset =~ s/#\w#\d+//g;<br />
    $temp_hyponyms =~ s/#\w#\d+//g;<br />
    $temp_synset =~ s/_/ /g;<br />
    $temp_hyponyms =~ s/_/ /g;<br />
    print $i.". ".$temp_sense."\n";<br />
    print "Synonyms: ".$temp_synset."\n";<br />
    print "Related: ".$temp_hyponyms."\n";<br />
    $i++;<br />
  }<br />
sub usage{<br />
print "\n\n\nUsage: ".$0." word\n\n\n\n";<br />
}</code></p>
]]></content:encoded>
			<wfw:commentRss>http://alexpb.com/notes/articles/2007/09/25/extract-data-from-wordnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
