Our admin scripts have historically been in Perl. With new team members who don’t know Perl and the growing popularity of Python, we are standardizing.
Perl — Strengths¶
Regular expressions as first-class citizens. CPAN. One-liners. Existing Nagios plugins.
Python — Why We’re Switching¶
Readability — you still understand it a year later. The standard library covers most needs. The new team knows Python. The future — the ecosystem is growing.
Decision¶
New scripts in Python 2.7. We are not migrating existing Perl scripts. Gradual migration, not a big bang.
Python Best Practices¶
argparse, logging module, subprocess, try/except, shebang, virtualenv. 30 lines of readable code instead of 50 lines of Perl.
Conclusion¶
Python for new scripts — readability and accessibility. Perl scripts stay as they are. Bash for simple tasks.
Need help with implementation?
Our experts can help with design, implementation, and operations. From architecture to production.
Contact us