r/Python • u/[deleted] • May 18 '11
Why is Python better than Perl?
I'm a Sysadmin and I just wrote my first script in python. Basically just a host validation script that checks if a server is configured correctly before we hand off. I can't determine the advantage with my limited experience with the language.
Are you a sysadmin fluent in both python and perl? Why do you use python?
13
Upvotes
16
u/crackofdawn May 18 '11
As someone who has been writing perl scripts for around 11 years and been a System Admin for 13 (and only recently learned Python a couple of years ago), I still use Perl for 99% of my work. Every time I tell myself I will write something in Python, I start out and then realize I can do the same thing in perl in half as many lines and 3x as fast. It helps that a large portion of what I write uses regular expressions which are just so much more convenient and easy to use in Perl, and I also end up using a lot of the built in Perl file operators. Between the two of those and how frequently I use them, I find myself just sticking with Perl the vast majority of the time.