4 ms·
Perl is really great at text processing. Pretty much any kind. A lot of folks dislike first-class regexes, but if they're magic in a lot of contexts like this.
by __jal 7y ago
Perl is really great at text processing. Pretty much any kind. A lot of folks dislike first-class regexes, but if they're magic in a lot of contexts like this.
My second remaining use is experimental coding. It is probably about familiarity and experience (I've been writing perl since Perl 4), but I find it to be the most fluid, most "fun" language for noodling around and trying out ideas.
I use Python for things other people will have to work on, because it is the current popular kid, so most folks have at least seen it. Not because I especially like it - the GIL is still a performance killer, purity of essence arguments keep obviously useful things (like case statements) out, and (as I'm sure will be demonstrated shortly) there are always annoying people around to condescendingly tell you why you're wrong to want things like case statements.
- DonHopkins 7y agoYou say "magic" as if that were a good thing. Which magic do you mean: supernatural, illusion, or fiction? https://en.wikipedia.org/wiki/Magic https://en.wikipedia.org/wiki/Magic >Magic may refer to: >Magic (supernatural), a set of beliefs and practices distinct from religion and science https://en.wikipedia.org/wiki/Magic_(supernatural) https://en.wikipedia.org/wiki/Magic_(supernatural) >Magic (illusion), the art of appearing to perform supernatural feats https://en.wikipedia.org/wiki/Magic_(illusion) https://en.wikipedia.org/wiki/Magic_(illusion) >Magic in fiction, the genre of fiction that uses supernatural elements as a theme https://en.wikipedia.org/wiki/Magic_in_fiction https://en.wikipedia.org/wiki/Magic_in_fiction
- Grinnz 7y agoIn this case, it's a Perl concept related to DWIM (Do What I Mean), where the features will make practical assumptions about what you need to accomplish in their implementation, so you don't have to worry about the details. It can be abused (and is) but is also very useful for quick oneliners in particular. Not to be confused with the Perl feature called magic, where functionality can be attached to a variable to affect what happens whenever it is accessed. Though this is often used to implement the former concept.