Jesse Smith has asked for the wisdom of the Perl Monks concerning the following question:
But I can only post one line of content. How can I post it like this...#!/usr/bin/perl -w use strict; my @array = ('words', 'will', 'go', 'here'); my @array2 = ('words2', 'will2', 'go2', 'here2'); print "Content-Type: text/html\n\n"; print "$array[rand @array] - $array2[rand @array2]\n";
so I can include a page of HTML with the random words?#!/usr/bin/perl -w use strict; my @array = ('words', 'will', 'go', 'here'); $array[rand @array] my @array2 = ('words2', 'will2', 'go2', 'here2'); $array2[rand @array2] print "Content-Type: text/html\n\n"; print <<EOM; <title>Title goes here</title> <H1>HTML can now go here</H1> <P> Then the random words go anywhere as $array and $array2... <P> $array <P> $array2 <P> Footer text can go here!!! EOM exit; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Print out random words with HTML
by AnomalousMonk (Archbishop) on Oct 12, 2016 at 04:07 UTC | |
by Jesse Smith (Acolyte) on Oct 12, 2016 at 05:07 UTC | |
by Athanasius (Archbishop) on Oct 12, 2016 at 05:19 UTC |