Zecho has asked for the wisdom of the Perl Monks concerning the following question:
I plan to rewrite it using CGI as soon as I learn CGI.#!/usr/bin/perl -w use strict; my @nums = qw/00 20 40 60 80 A0 C0 FF/; my $f=0; my $g=0; my $h=0; print "Content-type: text/html\n\n"; print '<html><head><title>Web-Safe Colors</title><head>'; print '<body><table align=center border=0><tr><td>'; while($f<8) { $g=0; $h=0; print '<table width=100% border=1 cellpadding=5>'; while ($g<8){ $h=0; print "<tr>\n"; while ($h<8){ print "<td align=center bgcolor=\"\#$nums[$f]$nums[$g] +$nums[$h]\">"; print "<font color=\"\#$nums[7-$f]$nums[7-$g]$nums[7-$ +h]\">"; print "$nums[$f]$nums[$g]$nums[$h]<\/font><\/td> "; + $h+=1; } print '</tr>'; $g+=1; } print "<\/table>\n<p>"; $f+=1; } print '</td></tr></table></body></html>';
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Sneaky glob trick (was Web-Safe Color Chart)
by blakem (Monsignor) on Oct 05, 2001 at 12:46 UTC | |
by trantor (Chaplain) on Oct 05, 2001 at 14:19 UTC | |
by blakem (Monsignor) on Oct 05, 2001 at 14:41 UTC | |
by trantor (Chaplain) on Oct 05, 2001 at 14:56 UTC | |
by Chady (Priest) on Oct 05, 2001 at 13:46 UTC | |
|
Re: Web-Safe Color Chart
by merlyn (Sage) on Oct 05, 2001 at 10:48 UTC | |
|
Re: Web-Safe Color Chart
by trantor (Chaplain) on Oct 05, 2001 at 10:57 UTC | |
|
Re: Web-Safe Color Chart
by Zecho (Hermit) on Oct 05, 2001 at 11:25 UTC |