4 ms·
Can anyone advocate here their thoughts to "must use" Perl for any scripts / projects?
by jzer0cool 4y ago
Can anyone advocate here their thoughts to "must use" Perl for any scripts / projects?
- ajsnigrutin 4y agoPerl is great for working with text based data and stuff that is a pain to do in bash. It is also great at stability (ie. code written 20+ years ago, still works on modern systems). So for me, something that I'll write, put in some cron somewhere and forget, is all written in perl... at the same time, my colleagues are rewriting old python2 stuff, because modern distros come with python3 only. Some of them had to fix stuff even for 2.6->2.7 python versions.
- cafard 4y agoI don't know about "must use", but now and then I write a short script for some kind of text processing. I've also used it fairly recently for a script pulling data out of SQL Server, mostly because I already had the DBI::Sybase module installed.
- alfiedotwtf 4y agoMy MO is to start off scripts in bash, but once I get to about 3 functions in or need to do some text processing (but no need to drop down to Rust), I rewrite the script in Perl and go from there. On the flip side, I would never get a Perl script and rewrite it in Bash. Perl <3
- nprateem 4y agoAbout the only thing now is `perl -pie` on the CLI to run some one-liners (especially when you don't want to fight sed).
- perlperson 4y agoI haven't seen frameworks in other languages rival mojolicious for rapid prototyping, web scraping, and good event-driven support. It's super easy to make websockets and even quickly have unit tests. Mojolicious still has 0 external dependencies and is rock solid and very scalable. The simplicity is just very nice compared to, for instance, frameworks in which lots of code generation is involved just to get started.
- cestith 4y agoMojolicious is being brought to JavaScript, too. The intent is to have the same basic framework in both languages.
- InfiniteRand 4y agoIf you really want to push regular expressions to their absolute limit of sanity, I think Perl is still the best language to do that
- doomvox 4y agoPerl has a fast, powerful well-integrated regular expression engine, with full unicode support. In general, Perl tends to be much faster than the competing scripting languages (which is why you never see people talk about benchmark numbers, they'd give you the wrong answer).
- xorcist 4y agoTwo great things about Perl that other languages can learn from: The coloring of strings as dirty or clean on I/O. The object model of Moose.