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";

In reply to Re^2: Creating a random generator by Lady_Aleena
in thread Creating a random generator by Lady_Aleena

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.