Did you come up with something better than Quorum in the previous Learning Perl challenge? There’s been some spirited conversations since then and some surprising new information. Continue reading “Learning Perl Challenge: Be better than Quorum (Answer)”
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. Continue reading “Learning Perl Challenge: Be better than Quorum”
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. Continue reading “Perl’s special not a numbers”
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. Continue reading “A use for the scalar reverse (maybe)”
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: Continue reading “Word counting and Zipf’s Law”