>>>>> "r" == rogers-pm5  <[email protected]> writes:

  r>    From: "Greg London"<[email protected]>
  r>    Date: Mon, 27 Sep 2010 20:49:49 -0400

  r>    Oh god. I'm digging through what might be on the order of.a hundred
  r>    thousand lines of perl code on a system.  The file that snippet came
  r>    from is over ten thousand lines long. My brain is about to implode.

  r>    Thanks.

  r> You have my sympathies.  Anyone who writes

  r>         if ($#{$Queue} <= -1) { ... }

  r> instead of

  r>         if (! @$Queue) { ... }

  r> is either ignorant, or evil.  Possibly both.

<AOL>ME TOO!</AOL>

actually the <= part is even more amusing. look here:

perl -le '$#foo = -2 ; print $#foo'
-1

you can't set the last index to < -1. which makes sense. which makes the
original code even dumber.

uri

-- 
Uri Guttman  ------  [email protected]  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------

_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to