4 Feb Peteris Krumins has a new book, Perl One-Liners Explained. His new book is in the same style as his previous books on awk and sed. Perl One-liners. Perl one-liners are small and awesome Perl programs that fit in a . I explain this example in detail in one-liner (page 41), but basically you. Perl One-Liners showcases short and compelling lines of code that do all sorts of handy, geeky things.

Author: Mobei Nikotilar
Country: Qatar
Language: English (Spanish)
Genre: Love
Published (Last): 26 June 2005
Pages: 364
PDF File Size: 8.68 Mb
ePub File Size: 9.90 Mb
ISBN: 876-6-31245-284-2
Downloads: 14465
Price: Free* [*Free Regsitration Required]
Uploader: Dakus

Text conversion and substitution.

Announcing my third e-book “Perl One-Liners Explained” – good coders code, great coders reuse

Peteris Krumins is a programmer, systems administrator, start-up manager, and all-around hacker. It uses the list range operator.

The effect is that a newline char gets inserted before the line. Sections are seldom more than one page long, so the books perl one-liners explained ine-liners to read a little at a time. Hi Zsolt, Now that I finished the trilogy of awk, sed, and perl e-books, I will finally perl one-liners explained the parser to convert them to.

For example, I had odd classes with getters for certain values but not setters. GNU sed does not have that limit: It does it by enabling the paragraph slurp mode through command line argument, which reads the input paragraph-by-paragraph, rather than line-by-line, and perl one-liners explained the paragraphs. I have written my fourth pedl The perl one-liners explained operator repeats the thing on the left N times.


Cross-browser testing from your browser! I am under source control so there’s no harm in just operating right on the files. Now I know the -e needs nothing but a constant here. And Perl was, I think, the first first-class scripting language that integrated regexes so closely to control structures and other language features in a way that feels truly natural. Sorry I don’t have reading recommendations. I really love writing about oje-liners and I have planned onee-liners many more books.

perl one-liners explained

Perl One-Liners Explained

I explain the -i perl one-liners explained, -pand -e arguments in the e-book in great detail. The sneaky part is the ordering of the flags: Also, you get ideas about what you can do. I haven’t checked every technical detail, I’ll trust you to get that right.

I don’t really read as much as just diving into man pages expalined looking up guides online. It’s 5am here actually.

Perl One-Liners

The input has been double-spaced. Calculations PDF Chapter 5: Perl one-liners explained, could have bought two – one for me and one for you! It’s aimed at biologists but most of the scripts are more generic.


Expoained is the perl one-liners explained of Browserling and Testling, and he runs perl one-liners explained popular programming blog catonmat. You can solve this problem with a Perl one-liner but it gets a bit complicated. The 1st one is called ” Awk One-Liners Explained ” and the 2nd one is called ” Sed One-Liners Explained ” They’re written in a similar style as this e-book and they teach practical Awk and Sed through many examples.

I think you can achieve exactly the same without pipes with: I went through all the one-liners, improved explanations, fixed mistakes and perl one-liners explained, added a bunch of new one-liners, added an introduction to Perl one-liners and a new one-lienrs on Perl’s special variables. Your one-liner prints newline before the line.

First of all it does not have any code, perl one-liners explained -e is empty. Working with Arrays and Strings Chapter 6: