#!/usr/bin/perl use strict; use CGI qw(param); print "Content-type: text/html\n\n"; print "
\n"; if (param('s')) { my @string = split(//,param('s')); foreach (@string) { s/ /\ \;/; print "" . $_ . "\n"; } } print "
\n"; sub random_style { my $red = 20 + int(rand(255)); my $green = 20 + int(rand(255)); my $blue = 20 + int(rand(255)); my $color = "rgb(" . $red . "," . $green . "," . $blue . ")"; my $size = 12 + int(rand(38)); return "color:" . $color . ";font-size:" . $size . "px;"; }