Hacker News new | past | comments | ask | show | jobs | submit login

But as Perl-compatible regular expressions are available in many other languages, this is not really a reason for learning Perl itself, right? Or am I missing some deeper insight into regexes, because I don't know Perl?



It is a matter of personal preference.

I find that regular expressions and text-wrangling tasks are faster and easier in Perl than in other programming languages due to its accessible syntax and regular expression engine speed.

This article shows the regular expression syntax in several popular programming languages: https://cs.lmu.edu/~ray/notes/regex/

This GitHub repo gives some regex performance test benchmarks: https://github.com/mariomka/regex-benchmark Perl is pretty fast among the scripting languages that were benchmarked.

If you are familiar with C / C++, then learning Perl is relatively fast and easy: https://perldoc.perl.org/perlintro


That's true, but it's worth mentioning that using the regexes in perl is quick and even fun to write. They are built-in to the language. some people find it very convenient.


Also the Perl community has been pushing the boundaries of regex and text processing generally.

If you find yourself in a place with frequent one-off text wrangling or Unix admin problems some Perl knowledge is worthwhile.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: