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

use Perl Log In

Log In

[ Create a new account ]

Matts (1087)

  (email not shown publicly)

I work for MessageLabs [] in Toronto, ON, Canada. I write spam filters, MTA software, high performance network software, string matching algorithms, and other cool stuff mostly in Perl and C.

Journal of Matts (1087)

Tuesday July 08, 2003
10:28 AM

Weirdest perl bug ever...

[ #13326 ]

OK, probably not "ever", but definitely odd. Try and replicate this:

Sort subroutine didn't return a numeric value at /path/to/ line 92

And line 92 is:

my @sorted = sort { $b->[2] <=> $a->[2] } @probs;

(i.e. it's part of what almost looks like a long-hand Schwartzian transform).

Nobody on could replicate the error message, although admittedly we didn't try very long.

I got this error emailed to me automatically from our scanning system, which sends me an email when an exception occurs. I received 1 only, out of about a billion ore more emails processed.

My theory is this is just cosmic rays. But it's certainly most odd looking.

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.
  • $ perl -e '@x=sort{$a->[2]<=>$b->[2]}[0,0,0e9999],[0,0,0]'

    That's because <=> returns undef when it encounters NaN.