What’s new: Experimental features

Learning Perl, Seventh Edition (now available for pre-order) 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

Learning Perl, 7th Edition is now available for pre-order. Amazon.com 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.

If you don’t like Amazon.com (whose link gives us a little kickback without costing you more), you can also pre-order directly from O’Reilly.

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…

The locale’s thousands separator

Perl can use the thousands separator appropriate for your locale, as well as the appropriate decimal separator. The Number::Format from CPAN can do all sorts of interesting localizations, but POSIX can do it.

I debated offering an example in Learning Perl (7th Edition), but POSIX‘s localeconv function returns a hash reference. And, although I’ve added an appendix covering experimental features, I didn’t want to go through enough Perl to explain slices and postfix dereferencing. » Read more…

The evolution of character class shortcuts

Character class shortcuts used to be easy because ASCII was easy. Either of those were easy if ASCII was what you wanted, but quite limiting otherwise. Perl v5.6 introduced Unicode support and the world started to change.


A good programmer is always trying to eliminate ambiguity. Their code should work the same way everywhere, but character class shortcuts can’t guarantee that anymore. I wrote about these a bit in Know your character classes for The Effective Perler.

» Read more…