Why am I learning Perl?

kinow @ Jun 15, 2011 23:35:08

Last month I attended the II Sao Paulo Perl Workshop, where I had the privilege of learning with the great talks performed by bryan d foy, Brad FitzPatrick and Larry Wall. For being a Java programmer, you can imagine how lost I was feeling there.

The first programming language that I had contact with was Perl. I was a 16 years old Slackware aficionado at that time, and was dying to have a web site with a guestbook . We did not have any cheap hosting services in Brazil that offered a PHP environment, but there were few companies that offered a free host with ads, and with Perl. I don’t remember which script I used, only that I found it in and that it stored the guestbook entries in disk. Now, ten years after, here I am playing with Perl again! :-D

Well, what was my idea of Perl before the event? I thought it was an old programming language, very powerful, but over complicated. And what do I think of Perl now? I think it is an old programming language, very powerful, but may be complicated.

Being an old programming language does not mean that it cannot dispute with newer programming languages such as Ruby, Python, Scala or Go. Actually, it means that it is old, has a plethora of examples, good documentation and a vast and supportive community (a quick note here, Perl is the programming languages with more existing modules). Larry said during his talk that Perl won’t die, but evolve with time and have its place among other programming languages.

During my four years in Mackenzie University, the programming language that I used the most was C, and the script programming language was Shell. After the talks in the workshop, I realized that Perl has the best of both worlds, but its programs do the same thing with less lines of code in C and it has more modules and is more powerful then Shell.

I still think Perl is complicated, but depending on who wrote the code. :-) I found some nice code in CPAN to start playing with. Neat and easy to understand and modify/maintain.

I have a bunch of programs that I use to automate some tasks or simply customize my environment (turning a folder in a PHP project for Eclipse, for instance). As I use Windows and Ubuntu, I have C programs and Batch and Shell scripts that I use in both environments. I am slowly migrating my C and Batch and Shell scripts to Perl when applicable. This will save me time compiling my C code for each OS, and will replace some scripts that were getting too long and complicated.

Perl, here we go!