Re:Perl One-Liners Explained, Part VII: Handy Regular Expres...
by JadeNB on Thursday November 10, 2011 @11:05AM
(#3220543)
I approach these articles as a way to show off the expressive abilities of a language, not to provide code snippets for cut-and-paste.
As others have mentioned (and as the articles themselves repeatedly mention), most of the time, if you have a common problem, you should find and use a CPAN module already built to solve it.
I have never used a code snippet from a one-liner compilation in one of my programs, but I have learned a lot of new constructs by reading them.
EDIT: Or, what tikhonj (http://news.ycombinator.com/item?id=3219843) said.
If you need a book to explain one-liners, it will be challenge to comprehend a program with 20 such one-liners.