Practical Perl Programming

If you really wanted to learn Perl programming language, you would have learned it already. But if your will was not enough, and you still haven’t learned it, you do, probably, feel guilty every time you think about it. Just to give you yet another reason to fill the guilt for not learning Perl, I present you with the link to the online version of “Practical Perl Programming” book.

If you know Perl, than you won’t find anything new there. You can read all of these information in Perl manuals, online guides, forums and at PerlMonks. This is just another reference for you.

But if you don’t know Perl, but want to learn it, there are two ways you can go about it. You can either bookmark the link and make a promise to yourself (yes, once again) that you will learn Perl and this book will help you when you’ll start. Or you can follow the link to the book and start learning right now. If you choose this path, than next time I post some link to Perl resource you’ll feel proud instead of guilty.

The time has come!

How To Write Unmaintainable Code

In many places Perl is called an unmaintainable language. People with brains know that you can write unmaintainable code in any programming language what-so-ever. People who are familiar with Perl know that it can be used to write the uglies code ever, or the most beautiful code ever.

Aside from Perl discussion, here is an excellent document that shows how to write totally unmaintainable code in Java. Most of the rules are generic enough to be applied to any language.

I just hope you will never, for the sake of the humanity, follow any of the rules described.

Hmm…

Most of computer geeks love Star Wars. At least those that I have seen on the web (Slashdot, etc). Now I am really getting interested if my starting to use pack() and unpack() in Perl yesterday has anything to do with me watching three episodes of Star Wars in like two days…

I should keep an eye on this trend.

Next stage of Perl mastery – pack()/unpack()

I have seen many ways to measure someone’s Perl skills. Most of these ways are based on usage of certain Perl concepts. Today I have stepped on the next level according to some skill measurements. I have used the unpack function very naturally, and without much hussle. Here is the snippet:

#!/usr/bin/perl -w
use strict;
my ($year, $month, $date, $hour, $min, $sec) = unpack("a4a2a2a2a2a2", 20040102200534);
print "$date/$month/$year $hour:$min:$sec";

I could have done it before surely, but today it came to me naturally – without any thinking or manual reference. I will have to expand and polish this skill now. pack and unpack are very powerful functions and can simplify life a lot. It’s time I start using them.