<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Perl on ngmarley.com</title><link>https://ngmarley.com/blog/tag/perl/</link><description>Recent content in Perl on ngmarley.com</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 14 Sep 2011 00:00:00 +0000</lastBuildDate><atom:link href="https://ngmarley.com/blog/tag/perl/index.xml" rel="self" type="application/rss+xml"/><item><title>Convert .m4a files to .mp3 format (with tags)</title><link>https://ngmarley.com/blog/convert-m4a-files-to-mp3-format-with-tags/</link><pubDate>Wed, 14 Sep 2011 00:00:00 +0000</pubDate><guid>https://ngmarley.com/blog/convert-m4a-files-to-mp3-format-with-tags/</guid><description>&lt;p&gt;A Perl utility I wrote to convert .m4a files to .mp3 format. It will also pull the tags over from m4a format. If there are no m4a tags, the script will die. (But of course you can just comment that part out.)&lt;/p&gt;&#10;&lt;p&gt;Here is the direct link to the script: &lt;a href="https://media.ngmarley.com/blog/wp-content/uploads/2012/11/m4a2mp3.pl_.txt"&gt;m4a2mp3.pl&lt;/a&gt;&lt;/p&gt;&#10;&lt;p class="note"&gt;Note: I’ve updated the code to reflect my more current programming style. If I had time to re-do this, I’d have used IPC::Open3 or something else for IPC, instead of the system call used.&lt;/p&gt;</description></item><item><title>spicnspan.pl – “clean up” text files</title><link>https://ngmarley.com/blog/spicnspan/</link><pubDate>Sat, 30 Apr 2011 00:00:00 +0000</pubDate><guid>https://ngmarley.com/blog/spicnspan/</guid><description>&lt;p&gt;At times I get tired of editing code with tabs. And by &amp;ldquo;at times&amp;rdquo;, I mean &lt;em&gt;every time&lt;/em&gt;. I hate tabs in code. I hate trailing spaces in code too (makes it more difficult to navigate using vi/vim). And more than anything, I hate Windows CR/LF (carraige return/line feed) line terminator characters.&lt;/p&gt;&#10;&lt;p&gt;So I wrote a script to take care of it. I call it &amp;ldquo;spicnspan&amp;rdquo;. To use: spicnspan&lt;/p&gt;&#10;&lt;p&gt;Simple enough.&#10;This script:&lt;/p&gt;</description></item><item><title>CPAN changing permissions on OSX</title><link>https://ngmarley.com/blog/cpan-changing-permissions-on-osx/</link><pubDate>Mon, 24 Jan 2011 00:00:00 +0000</pubDate><guid>https://ngmarley.com/blog/cpan-changing-permissions-on-osx/</guid><description>&lt;p&gt;&lt;a href="https://media.ngmarley.com/blog/wp-content/uploads/2010/06/code5.jpg"&gt;&lt;img src="https://media.ngmarley.com/blog/wp-content/uploads/2010/06/code5.jpg" alt="some Perl code"&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;some Perl code&lt;/p&gt;&#10;&lt;p class="alert"&gt; If you are looking for a Perl module to interface with Amazon’s S3 hosting service, &lt;strong&gt;do not&lt;/strong&gt; use the Net::Amazon::S3 module. It has an unrealistically huge list of modules on which it’s dependent (one of which is more like a framework — a pain in itself) and you’ll likely never get it installed. The &lt;a href="http://search.cpan.org/~tima/Amazon-S3-0.45/lib/Amazon/S3.pm"&gt;Amazon::S3&lt;/a&gt; module by Timothy Appnel installs without a hitch, and it was based on an earlier version of the Net::Amazon::S3 module. &lt;/p&gt;</description></item><item><title>basic Perl log function</title><link>https://ngmarley.com/blog/basic-perl-log-function/</link><pubDate>Wed, 30 Jun 2010 00:00:00 +0000</pubDate><guid>https://ngmarley.com/blog/basic-perl-log-function/</guid><description>&lt;p&gt;I believe any good Perl utility should have a log to which pertinent information should be written. I&amp;rsquo;m not even going to go over the merits of having a log file, but all good scripts should have one.&lt;/p&gt;&#10;&lt;h3 id="setup---define-the-function-and-log-filename"&gt;Setup - Define the Function and Log Filename&lt;/h3&gt;&#10;&lt;p&gt;Here&amp;rsquo;s the log function which I use in my Perl scripts. This could easily be exported to a log module. Yes, I realize there are probably a lot of good logging modules out there already, I&amp;rsquo;m just offering this for the lazy sods who don&amp;rsquo;t currently log anything in their Perl scripts, but realize that it&amp;rsquo;s a good idea to start.&lt;/p&gt;</description></item></channel></rss>