in reply to
Randomizing an array
FYI
perldoc sort
explains why your solution fails. Sort expects a (consistent) tri-state value be returned by the sorting routine eg; -1, 0, 1. Both
cmp
and
<=>
do, wheras your block does not.
--
I'm not belgian but I play one on TV.
Comment on
Re: Randomizing an array
In Section
Seekers of Perl Wisdom