|
#!/usr/local/bin/perl
# **********************************************************
# HTTP ヘッダの出力
# **********************************************************
print "Content-Type: text/html; Charset=shift_jis\n\n";
print "<HTML><HEAD>";
print "<STYLE type=text/css> TD { font-size:40;background-color:white } </STYLE>";
print "</HEAD><BODY>";
$a = "田中";
print "<SPAN style='font-size:40'>";
print "私は$aです<br>";
print '私は$aです<br>';
print "一覧表<br>";
print '一覧表<br>';
@a = ("I","love","you");
foreach( @a ) {
print "$_ ";
}
print "<TABLE border=5 cellpadding=10>";
@b = (1,10);
foreach( @b ) {
print "<TR>";
print "<TD>$_</TD>";
print "</TR>";
}
print "</TABLE>";
%fruit = ("red", "apple", "yellow", "banana", "purple", "grape");
print $fruit{"red"} . "<br>";
print "<TABLE border=5 cellpadding=10 bgcolor=skyblue style='border-style:ridge'>";
%fruit = ("red", "apple", "yellow", "banana", "purple", "grape");
while (($key, $val) = each (%fruit)) {
print "<TR>";
print "<TD>キー $key</TD><TD>値 $val</TD>";
print "</TR>";
}
print "</TABLE>";
print "</SPAN>";
print "</BODY></HTML>";
| |