Learning Perl Challenge: Be better than Quorum

Sinan Ünür wrote about some click bait that claimed Perl programmers were worse than programmers in a fictional language named Quorum. His post goes through all the experimental and analytic errors, as many of his posts do. » Read more…

Perl’s special not a numbers

Perl has some “numbers” that aren’t really numbers. Or, it has them if your underlying C library supports them.

The first, the “not a number”, is the string “NaN”, in any case. This isn’t a single value. The standard for floating-point numbers, IEEE 754. This value, which isn’t a number, returns itself in any mathematical operation. » Read more…

A use for the scalar reverse (maybe)

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…

Word counting and Zipf’s Law

On the final day my Learning Perl class, I talk about Zipf’s Law because people now have enough Perl to read a large file, break it up into words, count those words, and sort them by their count.

The final piece of Perl involves sorting a hash by value, which we cover late in the book: » Read more…

Formats

[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…