The reverse operator, which turns a list end to front, has a scalar context too. It’s one of the examples I use in my Learning Perl classes to note that you can’t guess what something does in context. I’ve never had a decent example for a proper use, but flipping a string around to effectively scan from the right seems interesting. » Read more…

[This is a special Blast from the Past post where I republish Randal Schwartz's original "Formats" chapter from the first edition of Learning Perl. I've really liked this output feature which has mostly been left behind by the online world that doesn't do physical pages. It hasn't been worth the 10 or so pages it would take up in the print version of the book, so I present it here mostly as it appeared—historical warts and all.]

What Is a Format?

Perl stands, among other things, for “Practical Extraction and Report Language.” It’s time to learn about that “…Report language” business. » Read more…

Warren Buffet’s Berkshire Hathway is insuring Quicken Loans’ prize of $1 Billion dollars to someone who picks a perfect March Madness bracket and 20 prizes of $100,000 to the closet brackets. The rules won’t be enumerated until March 3, but so far they haven’t outlawed Garciaparra-ing by pulling a Nandor. If you want people to sit up and notice Perl, winning this contest with a Perl program will get you all the fame you want. You’ll be any job you want, but with $500 million (the present day value single payout), you won’t have to take it. » Read more…

A student in my Learning Perl class asked about what shows up in a capture when you apply a quantifier to that group. The great thing about computer programming is that you can just try it to find out: » Read more…