Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Coding random numbers

by Roy Johnson (Monsignor)
on Feb 01, 2008 at 15:26 UTC ( [id://665583]=note: print w/replies, xml ) Need Help??


in reply to Coding random numbers

use List::Util 'shuffle'; for my $g (1..$Number_of_generations) { print "Generation $g:\n"; print "Geographic regions:\n"; for my $r (shuffle(1..$Number_of_geographic_regions)) { print "$r\n"; } }

Caution: Contents may have been coded under pressure.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://665583]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-25 16:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found