In my years as a System Administrator, I’ve written a fair amount of Perl code. Most of the code I’ve written is for automating day to day tasks, creating reports and monitoring for those dreaded OMG moments where things go belly up.
Perl tends to be the weapon of choice for most System Administrators and I think it definitely has merits in this space.
I find that most of my code written in Perl is very sloppy syntax wise and in most cases not Object Orientated. I learned to code in University with C and C++ and specifically with the Object Orientated paradigm. So there is always a part of my brain that nags at me when I write a lazy perl script in procedural code. I hear you say “Well, you can write OO code in Perl!”
I have tried to learn how Perl objects work and I have failed numerous times. I just can’t get my brain around it.
I think I’m probably stuck in my strictly structured programming languages.
In walks Python. About 12 months ago, I started looking at 3D programming on the desktop through numerous books and internet resources. That lead to me playing around with Python. Very quickly I found I could really understand python and how the objects work without needing to master the Perl object trickery. Python is also stricter on Syntax, which forces you to keep your code in line, which fixes my sloppy perl code issues.
Right now for me, I’m finding Python far more flexible and useful for sysadmin tasks. All my python code is OO now, cleanly laid out, which makes my code modular, reusable and cranks the awesomeness to 11.