http://qs321.pair.com?node_id=31600

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?
#!/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) }
- m peters - www gwangwa com -