Surprising output for the descending range ’01’..’-1′

The range operator has some interesting features to do more numbers, and one of them looks like it has some unintended special cases.

A couple of months ago, Hauke D reported some strange behavior with the range operator. Some of this is likely to be clarified in the v5.30 documentation but the odd cases remain. One part of this is useful and the others are probably surprising. Don’t depend on this feature for anything that’s important. Even though it acts like this, the undesigned feature may disappear.

» Read more…

Powerful command-line options

Gabor has his listicle for 7 of the most useful Perl command line options, although it’s really five after giving separate items for the -v / -V and -e / -E pairs. The others are -p, -n, and -i. I have my own list that I’d like to share. You might not like my list; go through perlrun to find your own. There’s also the book Perl One-Liners.

» Read more…

What’s new: Experimental features

Learning Perl, Seventh Edition adds an appendix on Perl’s experimental features. This way, we can introduce such a feature in the chapters without explaining the dance of pragmas and proper versions each time. People who don’t want to use those features can easily skip over those bits in the main text. » Read more…

Pre-order Learning Perl, 7th Edition

[Now that the book has been published you don’t need to pre-order it. Just order-order it.]

Learning Perl, 7th Edition is now available for pre-order. thinks they’ll have it by the end of September. Now that you can buy the book, I’ll start posting about what’s different in the new edition. We cover up to Perl v5.24, and I think we snuck in one note about v5.26.

Watch regexes with Regexp::Debugger

Wouldn’t it be great if books had embedded videos? That would make programming textbooks so much easier.

We have to give some hints about how regexes work in the first regex chapter in Learning Perl. It’s hard to describe something like greedy matching and backtracking with only words. It seems like it should be simple to describe, but you are probably like me: you think that because you already understand those concepts. » Read more…