4 ms·
Minor 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.
by rjbond3rd 15y ago
Minor 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.