|P is for Practical|
What technical benfits perl offers over python + few more questions.by Anonymous Monk
|on Nov 13, 2021 at 10:48 UTC||Need Help??|
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I've visited the PerlMonks monastery occasionally to glean over the fabulous and impartial help offered here.
I come here now with a question, that I hope will not rile you all.
I intend to use a scripting language for gathering reports, most of which will be filtering through command line outputs (The cli application is accessed through Ubuntu Linux). It has been over 10 years that I have written a script in Perl. Back then too, It was nothing earth shattering, just gathering command outputs and filtering stuff through regex. This time though, I need to gather outputs and redirect to an existing excel file, either populate the blank fields or update the existing fields with new data.
Most of my organization's current scripts are written in Python, but I will be the only person using the scripts I write and when it comes to capturing command line outputs, I like Perl's approach rather than the subprocess popen, communicate etc offered by python. Also, I have a preference for Perl's regular expressions than Python's. I am not dissing Python, it is a great language. But I like Perl a lot and want to use it for my work. I checked a few articles though, and they all seem to say that 1) Python offers better error handling than Perl 2)Functions are first class citizens in Python, 3)Even for the kind of reporting I am looking for, Python would be a better choice.
Most Monks here have played with and professionally used more than 1 language, and I think Python would be a part of that gamut.
Second and equally important part is, I need to put Perl in my resume as the only language I use for automation, thinking it will give me an edge over those who mention Python as the only scripting language they use. So is there any advantage in learning / refreshing Perl? How is the job market for Perl? Is it really low in demand like how a lot of articles/videos say on the internet?Ideally, I would like to refresh my Perl knowledge and learn Python too, however, given my current workload, I can pick only one as of now, and may be 4 to 5 months later, I can focus on 1 more language. That and the fact that it will not be a good idea to learn two languages simultaneously, is what is keeping me from re learning 1 language while learning a new one from scratch. Besides, I already know Perl to some extent, and refreshing it will (I think) take less time than learning another from scratch. My learning method is also quite unusual in that I focus on what I want, read up stuff on that (that's why I wrote the popen communicate point above) rather than learning everything and then write scripts.
Any help or guidance will be much appreciated