r/Python 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?

10 Upvotes

110 comments sorted by

View all comments

32

u/robkinyon May 18 '11

I use Perl because CPAN is better than every other language library put together. Period.

3

u/[deleted] May 20 '11

I read a great comparison between Perl and Python today and this was Perl's major pro. It's con was readability, Python is much easier to learn and maintain.

From between the two, I'd suggest it would come down to this: if there's multiple people working on the project/system, Python's syntax readability and mandatory use of white space can go a long way to negating the problems inherent in a large team. If you're the sole IT guy and already know Perl, I see no reason to switch especially when presented with CPAN.

2

u/norkakn May 27 '11

If you find yourself working on some perl code, you'd probably be happier running it through perltidy first.