http://qs321.pair.com?node_id=1106156


in reply to The future of Perl?

Hi,

Just thought of this so writing it now. Like stated earlier, I tried Python first and then went back to Perl. Mainly because it allows me to add to my scripts easily than Python. I don't start with Flowcharts of how my script will work. I just write a small script and test it, then add some error checks and functionality and try to make it as generalized as possible. Perl allows me to do that. So typically, my scripts would begin with all the data and code in the same .pl file, about 15-20 lines in all, and then I keep adding little by little and it grows to about 300 lines, and by this time, the input data is separated into a file and the actual script is in a different file, and it's doing everything from, say checking if the supplied input has exactly 8 hex characters, and if the configuration file is where it is expected or not, and if the mail server is up or not, and so on and so forth.

I don't know about the future of Perl for large projects, simply because I have never worked on a large software project and given my nature of job, I don't think I'll ever be, but:

When it comes to cli based automation, that can extract text, filter it out and email it, or put stuff in an excel and create charts, Perl shines. Rather, it outshines and out performs Python, especially when it comes to using Regular Expressions to mangle and slice and dice text based output, which is 90% requirement of my job. My opinion is based on my limited use of both Perl and Python

Perl lets me do something like (my $i = 0; $i < 10; $i += 1.25), which I really badly needed at that time, and still do, because I just have to loop over things that way to get my job done.

It has ternary operators, which is something that I really like and was not available in Python back when I tried it out. As Perl is not white space sensitive, I can do nested Ternary loops and still nicely comment it and space it out so that it doesn't appear cryptic.

Strawberry Perl Portable is another plus point. I can install all the modules I need, then just copy the folder onto a server and have my scripts using the perl executable from that folder. No need to touch the pre installed Perl on the Servers.

These points might seem trivial, but they do matter for me. I'm sure there are a lot of folks out there like me and that's the reason why Perl will have a future for sure as folks like myself need it.