in reply to Re: Dangerous Names
in thread Dangerous Names
Incorrect! Proof:
$ perl -e '@names = (["Nan Tregar"], ["Sam Tregar"]); @names = sort { +$a->[0] <=> $b->[0] } @names;' Sort subroutine didn't return a numeric value at -e line 1.
Note that you have to work a little. Just a straight { $a <=> $b } gets optimized into something that doesn't do the NaN conversion.
-sam
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Dangerous Names
by ikegami (Patriarch) on Dec 17, 2008 at 22:04 UTC | |
by samtregar (Abbot) on Dec 17, 2008 at 22:05 UTC | |
by ikegami (Patriarch) on Dec 17, 2008 at 22:09 UTC | |
by samtregar (Abbot) on Dec 17, 2008 at 22:13 UTC | |
by ikegami (Patriarch) on Dec 17, 2008 at 22:42 UTC |
In Section
Meditations