4 ms·
First, it's not just just good regex support, it's easily accessible features from the command line so you can quickly iterate to a solution. I'll often need t
by kbenson 14y ago
First, it's not just just good regex support, it's easily accessible features from the command line so you can quickly iterate to a solution.
I'll often need to pull some very specific information out of a very large log file, and often Perl is the quickest way to achieve that. i.e.
# pseudo-code
head -n10000 LARGE_FILE | perl -ne 'next unless my ($foo,$bar) = /include/gsmi; ${foo}+=$foo, $h{$bar}.=$bar}; END { print %h }'
Once you're happy with results on smaller data sets with head, replace with cat. I used a similar technique to quickly identify, classify and determine the user account for a large set of hacked Wordpress accounts at an ISP I worked for.
Secondly, Perl is still the leader in regex development. They are still adding features that other languages are adopting (there have been a few good ides from outside they've taken as well, such as named captures, so credit where it's due).