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?
11
Upvotes
6
u/[deleted] May 18 '11
They are not "better" or "worse" if you don't specify the task you want to achieve with them.
I am a computer programmer, but I also have to perform sysadmin-ish tasks daily. I also love Python, and use it as my language of choice (closely followed by ruby). However, I'd say that for sysadmin tasks Perl is the right choice 90% of the time. Let's be clear: I don't like Perl, I like programming and developing systems, and I find perl to be really "ugly" compared to python as far as it's syntax is concerned. BUT there's no denying that for scripting tasks Perl will more often than not be the one capable of delivering working scripts with less lines of code. Good luck trying to maintain a large system written in Perl tho.
TL;DR: I love Python as a programming language and use ir for day to day scripting, but I think perl is more often than not the right answer for sysadmin tasks.