11 ms·
Why Perl?
- psychphysic 4y agoWhat is it about these very short articles that HN loves? (Short, subjective but presented objectively). Or is it just loved by those who agree with the premise in this case Perl die hard?
- burnished 4y agoThe article is clearly presented as a matter of personal opinion with the framing as the answer to the question 'why does the author use Perl so much'. I liked it because it is interesting to read other people's examined opinions on topics that I am ignorant of.
- nnadams 4y agoI like short articles in general, but this one is short and shallow, plus subjective without explanation as you mentioned. I spent too much time trying to guess at the author's reasons. Why are Python and JavaScript not extensible but R is?
- worik 4y agoI like short stories on HN. The most interesting part are the HN comments, and without reading the story first, it is rude and less interesting commenting. So short stories are a plus for me!
- deleted 4y ago[deleted]
- owl57 4y ago> published 2023-05-26 Hmm…
- sdfghswe 4y agopublished 2023-05-26 cool story bro
- xyzzy4747 4y agoIMO it's better to just use TypeScript anywhere that you'd normally use Perl. The type safety helps later on when you revisit old code plus I think it's more productive overall, having used Perl many times in the past.
- koito17 4y agoWhile I see benefits of TypeScript's type system, I think the lack of a special compilation step is a big win for Perl, at least in the author's eyes. (Yes, I know Deno is a thing, but I'm not sure of the extent which the author considered it).
- xyzzy4747 4y agoYou can run ts-node to execute TypeScript to run it without having to manually compile it first. Although if you have a large TypeScript program with a lot of dependencies or on an older machine, I guess it could take some time. With my own scripts I've only seen it take a few seconds at most.
- worik 4y agoThe Javascript ecosystem (to which Typescript belongs) makes the Perl ecosystem of twenty years ago look modern and streamlined.
- yamtaddle 4y agoNooooo. Python's the clearest front-runner in the Perl replacement game. I wish it were Ruby, but it's pretty clearly Python. TS changes too fast and requires too many tools, it's not even a serious contender in this category, though I much prefer it to any of the above for large programs. Python has some semi-decent type hinting, these days. It's not so bad, it'll keep you out of most of the same trouble that TypeScript does.
- eCa 4y agoSlightly easier to start using Type::Tiny[1] than switching languages. [1] https://metacpan.org/pod/Type::Tiny https://metacpan.org/pod/Type::Tiny
- dgunay 4y agoI can't seem to convince myself to use Perl anymore for serious applications, but I do still whip it out occasionally for essentially the "shell scripts with sane control flow" use case. IMO it is still mostly unmatched in that area. Most other languages, while just as capable, require far more line noise to interact with streams and use regexes. I admit though I have studiously avoided learning awk and sed over the years.
- juanse 4y agoI do exactly that but with ruby
- doubled112 4y agoI don't think I have ruby on any system I administer, but perl is almost always there.
- ElectricalUnion 4y agodpkg requires perl, so perl is around .deb systems even if perl itself is not directly used.
- deleted 4y ago[deleted]
- jrochkind1 4y agoRuby works great for this, but is unfortuantely not installed on many systems -- but this isn't just bad luck, I think it's a consequence of the fact that ruby code written two years ago has a pretty good chance of not running on the recent version; and code written for the recent version without thinking about backwards compat also has a good chance of not running on ruby of two years ago... Means as a language it's not suitable for "have it installed on every system and then just throw code at it that will work, and keep working" like Perl. Even if you could convince all the distro maintainers to include it, you'd never have the version you want/need. Which would be different for different scripts, and you'd have to be constantly updating all your routine maintenance scripts you just wanted to put there and have them keep working -- which with Perl you could. I wish ruby were more about backwards and forwards compat, but it isn't.
- robbywashere_ 4y agoFor a bit of fun, I'd recommend starting off with an ugly bash script when you just want to hackily and happily get something done, then asking chatgpt to convert it to another language(go? perl? ruby?) It is interesting to see the trade-offs.
- ParetoOptimal 4y agoSeems fun, let's try it. > ChatGPT> Rewrite the following as concisely as possible in perl, perl 6, J, Haskell, with no explanation and only code: history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head Perl: `history | perl -ne '/^\s*\d+\s+(\w+)/ && $a{$1}++; END { for $i (sort {$a cmp $b} keys %a) { print $a{$i}." ".$i."\n"; } }' | sort -rn | head` Perl 6: `history | perl6 -ne '/^\s*\d+\s+(\w+)/ && $a{$1}++; END { for $i (sort keys %a) { say $a{$i}." ".$i; } }' | sort -rn | head` J: `head sort |. |:+/ ,.~ [: ~. stdin -: i.0"1 <@:". ] Haskell: `reverse . take 10 . sort . map (\x -> (length x, head x)) . group . sort . map (words) $ lines <$> readFile ".history"` from https://www.commandlinefu.com/commands/view/604/list-of-commands-you-use-most-often https://www.commandlinefu.com/commands/view/604/list-of-comm...
- tankenmate 4y agoBoth of those Perl solutions could be shorter (and probably quicker) in that you don't need the "sort -rn" as you can do that sort directly in Perl.
- tankenmate 4y agoSomething similar to this; history | perl -ne '/^\s*\d+\s+(\w+)/ && $a{$1}++; END { map { print "$a{$_} $_\n" } splice((sort {$b <=> $a} keys %a),0,10) }' Oops, just realised it should be sorted by the value and not the key so... history | perl -ne '/^\s*\d+\s+(\w+)/ && $a{$1}++; END { map { print "$a{$_} $_\n" } splice((sort {$a{$b} <=> $a{$a}} keys %a),0,10) }' Also noticed that splice() isn't setting wantarray() so you'll need to use direct indexing which is probably easier to write too... history | perl -ne '/^\s*\d+\s+(\w+)/ && $a{$1}++; END { map { print "$a{$_} $_\n" } (sort {$a{$b} <=> $a{$a}} (keys %a))[0..9] }'
- jeron 4y agoI ask my company this question and the answer is mostly "it's what we used 20 years ago"
- worik 4y agoThat is a good answer.
- winrid 4y agoWhat companies are still using Perl on the backend? I know FastMail does. IMDB was in Perl before Amazon acquisition, and was told was rewritten in java over several years. Any other interesting mentions?
- tribby 4y agocraigslist is the first one that comes to mind
- xyzzy4747 4y agoAthena Health's entire backend is/was in Perl as of the mid 2010s (note: I didn't work there, only interviewed once).
- aeruder 4y agoLarge parts of the ziprecruiter website are still powered by perl.
- ojhughes 4y agoBooking.com is known for using perl
- DonHopkins 4y agoFor a company whose corporate headquarters are in the Netherlands, they sure have a pretty antimonarchist name: BooKing.com https://www.theatlantic.com/news/archive/2016/07/dutch-king-insult/491498/ https://www.theatlantic.com/news/archive/2016/07/dutch-king-... https://www.theguardian.com/world/2018/feb/05/dutch-divided-over-law-against-insulting-the-king https://www.theguardian.com/world/2018/feb/05/dutch-divided-... https://dutchreview.com/news/politics/illegal-to-insult-the-king/ https://dutchreview.com/news/politics/illegal-to-insult-the-...
- deleted 4y ago[deleted]
- biomcgary 4y agoMy two favorite languages: Perl and Go. Both have very simple one file deployment, but my favorite use of Perl requires no file deployment, just one-liners on the command line.
- throitallaway 4y agoHow's that true with Perl since the interpreter is still needed? In that case the same could be said about Ruby, Python, et al.
- biomcgary 4y agoIf you work on Linux or MacOS, you can generally count on the interpreter being present. Even minimal installs of Linux tend to include Perl. Python might be as ubiquitous, but Ruby certainly isn't.
- pjmlp 4y agoIt might, but you better be sure it is the right version.
- AnimalMuppet 4y agoIf he's mainly using it for one-liners, how version dependent can it be? (I suppose it may depend on how long a line he's willing to type...)
- pjmlp 4y agoDepends on what is being called on that line. https://perldoc.perl.org/perl#History https://perldoc.perl.org/perl#History
- blipvert 4y agoSeconded. I just wrote a script to generate Terraform code to create a VM in the company vSphere clusters, only needing host name and IP address (optional flags for meme/cpu/etc). Description of datacentres, subnets, etc as YAML in the DATA section, works out all the right VLANs. Works out of the box on everyone’s Mac.
- jefftk 4y agoI'm confused about the compatibility X for Python. A few years ago, sure, but for an article published a month from now? You write python3 and it's installed everywhere.
- culopatin 4y agoIs it available in windows by default?
- recycledman 4y agoI'm sorry but my windows doesn't have Perl by default either perhaps I misunderstood your comment :)
- gkbrk 4y agoYou probably have it if you have Git Bash installed. Perl is a dependency of Git IIRC.
- recycledman 4y agoThen it's not by default right? I must have git installed !
- tankenmate 4y agoThe first versions of git were written in Perl (with some small speed sensitive parts written in C).
- culopatin 4y agoIt was a simple question. Author claimed it’s found everywhere, but if it’s not installed by default im not going to find it in enterprise environments
- deleted 4y ago[deleted]
- roblabla 4y ago
- jefftk 4y agoI wonder why this is dated a month from now?
- ashton314 4y agoDamian Conway once wrote a module called Timeline::Curves, if I remember right, that took the program back in time. I’m sure this explains it.
- rgrau 4y agoHere's where he explains how he did it: https://www.youtube.com/watch?v=ORjyXcLDd9M https://www.youtube.com/watch?v=ORjyXcLDd9M
- ape4 4y agoperl script off-by-one mistake, presumably.
- jefftk 4y agoBut "2023-05-26"?
- Scubabear68 4y agoYears ago I coined the phrase “Perlaphobia”, the fear that Perl will come back into my life again and again, and every time it happens I have to relearn it all over again almost from scratch. Still happens about every five years, although I am reaching for Python more and more in those situations. What always kills me is the weirdness of the basic data structures, array/stack function calls, and the truly impressively weird ways Objects are done.
- forgetfulness 4y agoI worked briefly at a shop that maintained a complex outsourced project by Yahoo (some ad bidding optimizations pipeline). As it turns out, they used Perl, one of the few sanctioned languages at Yahoo. The coding style handed over from the client forbade every other thing that Perl fans tell you that make the language warm and endearing to them; you were allowed to use about a few of the sigil variables, all the data structures were to be used in their "object reference" form, because it sidestepped the "contexts" functionality of Perl, which was to be avoided at all costs. I remember the tedium of having to maintain your own stacktrace, because all you got was a the `$@`, `$!` and `$?` variables, which contained precisely the last of various types of error encountered during execution within the process. If you encountered errors while performing error handling, the original error would be lost, so you had to keep a backup. Edit: man, the contexts, the fans sweared by them, making analogies to natural language; I'm sorry to sound elitist, but they often came across as enthusiastic amateurs rather than people with a formal background in Computer Science. They claimed that things like passing an array to a place where an integer is expected to get the length was richness, not insanity.
- xupybd 4y agoI'm also shock that in Perl you can alter your return type based on the type of variable the caller is putting your result in. https://perlmaven.com/wantarray https://perlmaven.com/wantarray That always appeared as madness to me. Why would you make things that cryptic to understand?
- 4y ago
- recycledman 4y agoThis article just seems biased, the author likes Perl therefore he/she will pull the strings to his/her side. For me it's just as simple as that.
- dale_glass 4y agoSadly Perl has fallen on hard times. I think the Perl 6 debacle is mostly at fault. As it stands, unfortunately CPAN is full of rotting modules. While it may be a maintained and usable language still, that puts a huge damper on any non-trivial development, because at any time something important might turn out to be broken or unmaintained, or without an API at all.
- worik 4y ago> Sadly Perl has fallen on hard times. I think the Perl 6 debacle is mostly at fault. I agree hard times. Hubris is at fault. Perl did too much and reached for the stars. Its happy place was a sane job control language. A niche Python is filling. I have used both, Perl extensively, Python when I must. Perl is much better, but being better is not enough. Perl did "everything". Python was "object orientated". People wanted the shiny "object orientated" and, sadly wisely, did not want a language that could do anything and everything. I blame Larry Wall, the genius, both for Perl's success, and Perl's failure. If only I could fail so brilliantly!
- PaulDavisThe1st 4y ago> Its happy place was a sane job control language maybe that was your happy place for Perl, but it certainly wasn't mine or that of lot of Perl users I've known over the years. #!/bin/perlish while (<>) { /* regex match */ /* do some stuff, with variables or the file system or whatever */ } Awk theoretically is a close match for this basic structure, but Perl is closer, most of the time.
- worik 4y agoYes. I mispoke. "A happy place" I shold have said I never learnt awk or sed bedcause I knew Perl. That loop, often in a command line invocation `perl -e 'while(<>){chomp;......}'` My point is its happy place was not application programming, gui systems. AS I commented elsewhere here processing every Apache hook. Pythin suffers the same problem. It too is brilliant at the little jobs, yet there are many GUI junk piles written in it, just as happened with Perl back in the day
- munchler 4y ago> It is installed by default everywhere. For some values of "everywhere". Pretty sure this is not true on Windows, for example.
- OJFord 4y agoFor extremely limited values of 'everywhere' which shake its definition. I don't think a basic Arch Linux installation includes perl. Windows as you say would surprise me. 'the major Linux distributions' (plus I think macOS, perhaps inherited from BSD, no idea) might be fair, but certainly not 'everywhere'.
- krylon 4y agoTo my mild dismay, it's not part of the base system in FreeBSD anymore[1]. It is easily installed, of course, but that means #!/usr/bin/perl does not work without manually creating a link. [1] I think it used to be part of the base system, at least.
- njt 4y agoPerl was removed from FreeBSD base more than 2 decades ago: https://bsd.slashdot.org/story/02/05/14/0015234/freebsd-perl-to-be-removed https://bsd.slashdot.org/story/02/05/14/0015234/freebsd-perl... And this was the right move. It meant that the version of Perl was decoupled from FreeBSD releases, allowed you to choose which version to install, and allowed you to install multiple versions if needed.
- jsrcout 4y agoYears ago Larry Wall presented a graph of programming languages with the axes labeled "whipupitude" and "manipulexity". Perl excels at both. It's still my go-to for tasks requiring a lot of text manipulation, or with just a bit too much complexity to be a shell script. Perl code does look odd at first, but it gets an unfair rap on that point - there are plenty of popular languages that are hard to mentally parse without some background.
- RadiozRadioz 4y agoI love these terms. I find it delightful when he, and others, have fun with language in this way. It's the same feeling I got when learning Perl and discovering constructs like unless/until, because _of course_ those exist. Breaking from the norm and enjoying the freedom and flexibility of language that is so often overlooked.
- drelihan 4y agoComparing Python to Perl ( assuming equal experience with both ): If you are a good programmer, you will write good Perl and Python code. If you are a bad programmer, you will likely write terribly horrendous Perl code and slightly less horrible Python code.
- ihatepython 4y agoIf you are an excellent programmer, you will write excellent Perl and good Python code. The Python language limits your ability to write excellent code, which also limits your ability to write horrendous code.
- Terretta 4y agoGreat username. Where do you stand on this topic? :-) Your vote ratio reflects the relative fewer excellent programmers to weigh in on your point. Majority: Python is pretty, perl is line noise. Minority: Simple isn't easy, succinct is expressive.
- worik 4y agoThere is a very interesting talk [By Rasmus Lerdorf ](https://youtu.be/wCZ5TJCBWMg https://youtu.be/wCZ5TJCBWMg) on the occasion of the 25th anniversary of PHP. He addresses the issue of why PHP not Perl became the "winner" on the web. (About ten minutes into the talk) In his opinion it was due to the Apache modules that build PHP, alternatively a Perl, interpreter into the Apache server PHP's implementation implemented just enough to make it work (document generation hook), while Perl implemented all bells and whistles, including path translation. This made all the Apache hooks available to the Perl programmer. On shared servers using a single Apache server and virtual host with several websites running on one Apache server this meant a Perl programmer could hijack the whole server Hubris
- HeckFeck 4y agoCurrently I am doing the coding for a prospective startup in Perl. Mojolicious plus DBIx::Class are quite powerful, though I wish the latter was better documented. A ‘how to do join tables without incurring hairloss’ tutorial is a must for every ORM. Mojo covers a lot of what you’d expect from modern web application development, and it does so with finesse. I hope it gets more attention. It seems many unfairly still associate Perl web development with a hodgepodge of bad CGI scripts.
- eCa 4y agoDBIx::Class::Helpers and DBIx::Class::Candy are nice layers on top.
- xupybd 4y agoWhile I don't agree with the author's opinion on Perl I'm in awe of their design. I love the look of their personal site. Perl is only ubiquitous in the Linux/Unix world. Try running it on Windows. You have to install some half working package. I have a strong dislike for Perl as I worked with it for many years. Much of that is that I knew nicer tools existed and I wanted to use them but some was they syntax. I hate the terse syntax and the gotchas. Issues like this https://stackoverflow.com/questions/7515029/cant-turn-off-buffering-in-perl-using-1 https://stackoverflow.com/questions/7515029/cant-turn-off-bu.... If you are new to Perl what is $|=1; going to mean to you? Then there is the fun of "Wide strings" https://stackoverflow.com/questions/9299941/perl-unicode-wide-strings-error https://stackoverflow.com/questions/9299941/perl-unicode-wid... You of course have to know the operators in Perl. There is a good reference https://perldoc.perl.org/perlop https://perldoc.perl.org/perlop but I remember before I found that page in the docs I was lost. Then there is the use of references. Do I need a \% here or just a % no wait I need a \$. It's not that hard but it's a friction I got sick of. Yes all languages have their warts but I did not like Perl's even after almost a decade of working with it.
- prosaic-hacker 4y agoPerl does not die easily because of the way many of us learned it. We started to used it for sysadmin automation (prehistoric DevOps) and then the early Web showed up and we used it for that too. After 15 years (much more the 10,000 hours of use) it was hard to forget. And that over 15 years ago. Once you have it in your brain it does not go away easily. I teach Python but I still think in Perl.
- williamDafoe 4y agoI agree with the author on just about all the advantages of Perl. However, I think that python actually now shares the same advantages since almost everybody is using Python 3.x. Perl's greatest strength was its regex library and string handling and Python has stolen everything it could from Perl's regex language and most of its string handling so the advantages of Perl are much diminished now. Python is showing signs of being an absorbing language - like English - any great words that are developed in another language, are stolen by English pretty soon afterwards ..
- deleted 4y ago[deleted]
- ur-whale 4y ago> Python has stolen everything it could from Perl It hasn't. In python, regex's are an effing library. In perl they're built into the language and can be summoned in a much more concise and efficient (metric:code clarity) way than python will ever manage as long as the bloody 'import re' will be required.
- HybridCurve 4y agoI am surprised no one has mentioned Perl's miserable signal handling and how working with binary data is clumsy and slow. These two things are what make it difficult for me to promote Perl as a great general language. But when you need to write a minimal amount to code to chew through a bunch of patterned text or such there is nothing better. It's my still go-to language for quick implementation in a minimal number of lines however.
- phendrenad2 4y agoPerl is a great language for getting things built. Amazon was originally built on Perl.
- tmaly 4y agoI have been writing Perl for over 20 years. But these days I use Python more and more. I found it hard to hire for Perl, so I switched the team over to Python.
- rektide 4y agoIt's a beautiful & succinct language to write in. When you know it & it's various implicit various implicit variables, you feel enormously powerful, are able to make really beautiful use of the bountiful context Perl leaves out for you. It's heady & compelling in a way almost nothing else ever has been for me. Pass by sigil is weird but everything being named symbols is a powerfully simple concept, that opens interesting roads. But gee it sure is nearly impossible to read after. Rebuilding the context of how everything fits together, remembering each little rule you've taken advantage of is a trying puzzle indeed. Sidenote, it's a long far off hope (lots of the base deb tools are Perl), but I hope someday we can run a Debian system without Perl, that we end up with more mature replacements eventually. It being everywhere is the authors #1. In general they try to present practical sensible reasons. But so few are language specific concerns, are context but not really talking "Why Perl" itself, why Perl the language. The seductive heady weird ambiance of Perl is so unique, is a much less structured & clear "why".
- AndyDevine 4y agoPerl is a write-only language.
- anthk 4y agoCheck PangZero of Frozen Bubble.
- forgetfulness 4y agoPerl is meant to be written and read intuitively. Which is a bad decision, in every language you're going by intuition 95% of the time, it's when a piece of code works in an unfamiliar way that you reason from first principles, and then having clear and rigid rules to fall back on gets you out of the rut more quickly. Perl's design makes this harder for purportedly giving you more tools to write code that looks about right.
- tp34 4y agoTranslation: I am not a competent $language programmer. You will not understand my poorly written code. In this case, language="perl". perl is not special in this regard.
- deleted 4y ago[deleted]
- WesolyKubeczek 4y agoOne glaring problem with perl in this day and age (apart from pass by value by default) is a lack of built-in generators. Python has them. Javascript has them. Go has goroutines. Bet Rust has some macros or something. Yes, I’m aware of some rotting modules on CPAN that half-assedly implement them, but given that they exactly bolt it on, they are full of gotchas, like Try::Tiny, with which it’s quite easy to forget that a return statement in the try block will do exactly the wrong thing.
- ether_at_cpan 4y ago> like Try::Tiny, with which it’s quite easy to forget that a return statement in the try block will do exactly the wrong thing Try::Tiny does its best without manipulating the parser itself; it's been superseded by Syntax::Keyword::Try (which alters the parser to make flow control work as you'd expect), and in the last few years of releases there is a native `try` keyword right in the language (which can be used in older versions via Feature::Compat::Try, which is a shim on top of Syntax::Keyword::Try in old versions and a no-op in new versions).
- coldtea 4y agoIn 2023? For no reason at all.
- azangru 4y agoWhat does he mean by a red cross in the Compatibility column for JavaScript? What is javascript incompatible with?
- daneel_w 4y agoThe part of the telecoms platform I maintain and develop at work is written entirely in Perl. It does incredibly well in every involved aspect, and with a higher-performing and more compact codebase compared to what would've been the outcome with Python, but I'm wary of my eventual departure from the employer because of how hard it is to find Perl people these days. As much as I love Perl I cannot say it's a future-proof choice and an absolute benefit to my employer.
- humanrebar 4y agoIf you pay a million dollars a year in salary, you'll have all the perl engineers you want. If you pay "market rate", you'll have some good engineers and some desperate engineers, with the ratio slowly trending in the negative direction over time. Point is, that's definitely a solvable problem, but only if you watch out for hard-to-quantify externalities. Anyway, if the salaries have to keep going up to keep high quality engineers, the economics of rewriting and/or deleting legacy code start being a lot more straightforward.
- naikrovek 4y agoI agree. there is rarely (if ever) a shortage of talent. there is (almost) always a shortage of desire to acquire said talent. like most things, it's a money problem.
- Kostarrr 4y agoFriends dont let friends write perl. Source: The legendary "Perl Jam" talk from the chaos communication congress. * https://www.youtube.com/watch?v=noQcWra6sbU https://www.youtube.com/watch?v=noQcWra6sbU * https://www.youtube.com/watch?v=RPvORV2Amic https://www.youtube.com/watch?v=RPvORV2Amic Also I find the "ubiquity" argument very side loped. What I could agree with is "small/self-contained install" (e.g. small single executable available for many platforms). But not sure how well perl fares there.
- vorticalbox 4y agothis reminded me of an article I read a while ago [0] "93% of Paint Splatters are Valid Perl Programs" [0] https://www.mcmillen.dev/sigbovik/ https://www.mcmillen.dev/sigbovik/
- pjmlp 4y agoOne very relevant feature is missing, it is like an high level C without with memory corruption related issues, given the language capabilities and standard library. Many stuff in userspace UNIX would still be fast enough for its tasks if done in Perl instead of C.
- gkfasdfasdf 4y agoI love perl, but since it doesn't come installed on alpine docker by default I end up using cut/awk/sed and friends instead. :.(
- ur-whale 4y agoNotably missing from the 5 points he makes at the start of the article: Perl's regexes (unlike python and a swath of other languages) are first class citizens in the language (and not some effing library you have to import, along with its clunky API). To wit: PERL: $x = $1 if(/^Line_start[ \t]*([0-9]+)/); PYTHON: import re m = re.match(r'^Line_start[ \t]*([0-9]+)/, line) if m: x = m.group(1) The latter is painful. This is the only reason that still makes me sometimes pick Perl over python when I need to slap together a quick and dirty run-once script to chew thru a big pile of data. Other than that, as much as I've used Perl over the years and found it extremely useful back in the day (coz it was the best there was at the time), it is a horrible language by modern standards ($ to identify variables, having to tell the compiler that an expr is at an end with a ';', ugh), and it is time to let it Rest In Peace.
- humanrebar 4y agoThe problem is that outside of very trivial or temporary situations, regexes should be named and tested. Especially for scripts that tend to be written, deployed indefinitely, and mostly ignored. One you have a name and a design where you can test the boundaries of that regex without, say, downloading large files or rearranging the filesystem, you aren't really buying all that much by avoiding some extra library boilerplate. But I'll admit that native support for regex comes in handy for throwaway scripts.
- methods21 4y agoSo sad they killed the dev cycle to Perl 6 and that I'm forced to use Python. :( JAPH