Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: Print out random words with HTML

by Athanasius (Archbishop)
on Oct 12, 2016 at 05:19 UTC ( [id://1173796]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Print out random words with HTML
in thread Print out random words with HTML

Hello Jesse Smith,

Actually AnomalousMonk’s approach works fine:

use strict; use warnings; my @array1 = qw( QUICK BROWN FOX ); my @array2 = qw( JUMPED UNFORTUNATE DOG ); print <<EOM; <P> The random words can go anywhere... <br> random $array1[ rand @array1 ] words $array2[ rand @array2 ] here <br> Footer text can go here!!! </P> EOM

Output:

15:17 >perl 1708_SoPW.pl <P> The random words can go anywhere... <br> random BROWN words JUMPED here <br> Footer text can go here!!! </P> 15:17 >perl 1708_SoPW.pl <P> The random words can go anywhere... <br> random FOX words JUMPED here <br> Footer text can go here!!! </P> 15:17 >perl 1708_SoPW.pl <P> The random words can go anywhere... <br> random FOX words DOG here <br> Footer text can go here!!! </P> 15:17 >

Why do you think otherwise?

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1173796]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2024-04-23 08:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found