in reply to Re: Re: Re: help in understanding the standard array shuffle
in thread help in understanding the standard array shuffle

All valid comments, but my reply wasn't to the original node, it was to Gloom's node, which was suggesting @array = sort { (-1,1)[int rand 2] } @array;.

In any case, I was nitting on the lack of a 0 return, which in light of your comments, matters little. (since random results from a sort sub are bad news...)

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: help in understanding the standard array shuffle
by extremely (Priest) on Feb 14, 2001 at 20:15 UTC
    Sorry, and of course merlyn said it better at the right depth. =) (You are right tho, to get the evil way correct, adding 0 to the mix would be necessary...)

    --
    $you = new YOU;
    honk() if $you->love(perl)