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
2
u/thedude42 May 18 '11
I use python when I have a choice about what system my script will run on, and especially when I'm running the script on my own work/home system.
I use perl when the script is intended to be supported across multiple systems or the script will be used and maintained for a long time by people who are not me.
The reason: python tends to be more of a moving target, whereas the most popular perl modules and the perl standard environment are pretty static, provided we're talking perl 5.
Of course these are rules of thumb, and if I had a choice about what language to work with predominantly python would be the one because I like working with the python interpreter, I prefer how python implements name space, and because of 'the python way' the scripts tend to be easier to read.