On Oct 9, ZHAO, BING said:

is there a single random number generator function in perl? Or do you have any idea/algorithm on how to shuffle the elements in an array?

The random number generator is rand(); its documentation is here:

  perldoc -f rand

To shuffle an array, read:

  perldoc -q shuffle

--
Jeff "japhy" Pinyan        %  How can we ever be the sold short or
RPI Acacia Brother #734    %  the cheated, we who for every service
http://www.perlmonks.org/  %  have long ago been overpaid?
http://princeton.pm.org/   %    -- Meister Eckhart

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to