in reply to Re: Creating a random generator
in thread Creating a random generator
esper, andreas1234567, and dwm042;
There are tiny variations between the code that you gave me. Will that make a difference? I would like to have as little white space as possible. So are all the carriage returns needed between the lines?
Now that I have the .pl file, how would I integrate this onto a web page? I do not have Perl installed on my computer at home so the only way to see it working is using on a web page.
Update 1
dwm042...On the following line, does "int" mean interger?
my $col = int(rand(scalar @colors));
To all
Can the items in the array(?) be put on seperate lines? In the actual generator I would like to create each item will be a phrase, a sentence, or a table and most will consist of a lot of html code.
Update 2
What does the qw mean on the following line? Found it in a search.
my @colors = qw(red yellow green cyan blue magenta white gray black);
Update 3
The above scripts are all causing 500 Internal Service Errors when I try to run them. I CHMOD 755'd them, was that wrong? Found the fix. I needed to add the following code.
print "content-type: text/html \n\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Creating a random generator
by Corion (Patriarch) on Sep 07, 2007 at 08:04 UTC | |
by Lady_Aleena (Priest) on Sep 07, 2007 at 09:16 UTC | |
by Corion (Patriarch) on Sep 07, 2007 at 09:25 UTC | |
by Lady_Aleena (Priest) on Sep 07, 2007 at 19:04 UTC |