4 ms·
Announcing my third e-book "Perl One-Liners Explained"
- agj 15y agoPerl one-liners are a great way to learn more about Perl -- there is a lot of uncommon syntax that makes some of the more advanced examples more like little puzzles. However, if you are not familiar with Perl, and fall to the common stigma that Perl is unreadable, I urge you to delve more into the modern Perl community. The community doesn't have the same tendencies towards built-in obfuscation anymore.
- rjbond3rd 15y agoMinor quibble but on his second example: > perl -le 'print map { ("a".."z")[rand 26] } 1..8' The double quotes are not needed around a and z. (Verified in 5.14, 5.12, and the truly ancient 5.8).
- pkrumins 15y agoYup, that's explained in the book, section 5.1. :)
- rjbond3rd 15y agoYes, I was just now reading the PDF book excerpt and came to note that there are no quotes in the example as it appears in the book, on page 4. The book looks like a great balance between fun and sheer density of information, a reference book that manages to be a delight to read.
- pkrumins 15y agoThat's correct. The density of information approaches the theoretical maximum. ;)
- chromatic 15y agoCertainly; they're barewords interpreted as string literals. The strict pragma forbids this interpretation.