Perlで電気ストーブを作る方法

このエントリーをはてなブックマークに追加
68nobodyさん
電気ストーブを作ってみましたが、うまく動作しません。うまくうごくように直してください、おながいします。

以下ソース
#!/Perl/bin/perl

@pairs = split(/&/,$ENV{'QUERY_STRING'});
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$QUERY{$name} = $value;
};
if ($QUERY{'O N'} eq 'ON') {
$heater = '#ff6666';
}
else{$heater = '#ffcccc';}
print "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"><html><head><meta http-equiv=\"content-type\" content=\"text/html; charset=Shift_JIS\"><title>stove</title></head><body>\n";
print "<table cellpadding=\"0\" cellspacing=\"0\" border=\"1\" width=\"250\">\n";
print "<tbody><tr>\n";
print "<td valign=\"top\" width=\"25\" rowspan=\"6\" colspan=\"1\" bgcolor=\"#ffffcc\"><br></td>\n";
print "<td valign=\"top\" width=\"10\" rowspan=\"1\" colspan=\"8\"><br></td>\n";
print "<td valign=\"top\" width=\"25\" bgcolor=\"#ffffcc\" rowspan=\"6\" colspan=\"1\"><br>\n";
print "<form method=\"get\" action=\"../cgi-bin/stove.pl\" >\n";
print "<center><input type=\"submit\" name=\"ON\" value=\"O N\"></center><br>\n";
print "<center><input type=\"submit\" name=\"OFF\" value=\"OFF\"></center><br>\n";
print "</form></td></tr>\n";
print "<tr>\n";

以下続く。