Should I choose perl or python for my server automation tasks?
I would suggest Python. Perl is considered, at least with most of the system admins I know, to be a legacy language. I see a higher prevalence of Python in the scripts that I use and I also want to say that Perl doesn't support many common features (like Objects) that Python does. Although, it's been several years since I've written in Perl so someone may correct me on that.
Perl. Strongly written but very flexibile.
Perl, Programmable Extraction & Report Language, appears to have originally conceived as a supercharged Awk. Python, from it's inception has been a general purpose, RAD (rapid application development), object oriented, extensible programming language. AFAIK, Perl has been extended to do most everything. The keyword being extended, that may make some seemingly simple things a bit kludgy. I happened to have been introduced to Python and I've never done Perl more than to maintain it a little.
Python ~ not for any of the intelligent reasons offered above, I just love Python :)
Perl does OOP, but it's an extension as well. Not sure if perl 6 has come out yet. The reason to go with perl or python is a matter of taste. Check out the systems you're going to be administrating. Almost all systems have perl, not as many have python. Perl has a larger library for handling things and can interface with C and other languages pretty easily. Also, Perl can be compiled, not sure if there is a compiler for Python. Perl has been used for system automation for many years, but is a more complex language than Python, which means that there is more than one way to do it, so Python code is probably going to be easier to read and maintain, which should be your primary purpose for systems automation.
Python : Reasons why you should use 1.Readability.Times after few months of coding when come back see your perl code you tend forget what you coded,but it is not the case with python. 2.Python is getting more popular every day. 3.Large user base and better support. 4.Design pattern,if you go through design pattern of python,you will come to know. 5.Learning curve. http://www.python.org/about/success/esr/ i highly suggest above article by eric s. raymond who is well known in open source community and hacker. I love python :)
@lando:Perl 6 is out.
Join our real-time social learning platform and learn together with your friends!