Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

RE: random sort of list

by BlaisePascal (Monk)
on Sep 08, 2000 at 19:22 UTC ( #31603=note: print w/replies, xml ) Need Help??


in reply to "a random sort of list"

I'd suggest using glob() to grab the file listing, randomizing that using the permutation code that floats around here alot, and then doing the foreach on that...
print "Content-type: text/htlp\n\n"; $n=1; @files = glob("random/*.html); fisher_yates_shuffle(@files); # see the Perl Cookbook for this functio +n foreach $file (@files) { ... }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://31603]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (10)
As of 2018-07-16 15:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (342 votes). Check out past polls.

    Notices?