Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • A perfect example to illustrate one of your points: I was working on some code when I ran across several instances of a variable named $number. Since this was one of our ubiquitous several hundred line subroutines that we are cleaning up, it was very, very frustrating to see such a useless variable name. After a bit of hunting through the code, I finally found the following:

    # $number is invoice number
    if ( defined $number ) {
        my @results = $dbh->selectrow_array(...);

    Had they just had the sense to name that $invoice_number, much of the code in the subroutine would have been dead obvious. Of course, the fact that something which is clearly immutable (either you have an invoice number or not) showing up repeatedly in code in non-obvious ways is another sign that there are serious confusions in thinking about how to program.

    That being said, nice essay. More people should read it.