petemar1 has asked for the wisdom of the Perl Monks concerning the following question:
as shown here, i'm pulling individual html files into a single page using cgi. the files are pulled in alphanumeric order. i want to be able to pull the files randomly. i know i need
srand, and some properly syntaxed function, but what am i missing?
- m peters - www gwangwa com -#!/usr/local/bin/perl srand; print "Content-type: text/html\n\n"; $n=1; foreach $file (<random/*.html>) { open (FILE, "<$file")|| &ErrorMessage; @file = <FILE>; print (@file); close(FILE) }
|
---|
Replies are listed 'Best First'. | |
---|---|
RE: random sort of list
by BlaisePascal (Monk) on Sep 08, 2000 at 19:22 UTC | |
RE (tilly) 1: a random sort of list
by tilly (Archbishop) on Sep 08, 2000 at 19:47 UTC | |
by Adam (Vicar) on Sep 08, 2000 at 21:03 UTC | |
by tilly (Archbishop) on Sep 08, 2000 at 21:23 UTC | |
by tye (Sage) on Sep 08, 2000 at 23:29 UTC | |
Re: a random sort of list
by little (Curate) on Sep 09, 2000 at 03:15 UTC |
Back to
Seekers of Perl Wisdom