print "<BODY bgcolor=\"black\" text=\"white\">\n";
 | 
# ------------------------- #
# Sub Header
# ヘッダー
# ------------------------- #
sub header {
    print "Content-type: text/html\n\n";
    print "<html>\n<head>\n";
    print "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=Shift_JIS\">\n";
    print "<title>$title</title>\n";
    &style;
    print "</head>\n";
    print "$body\n";
    $headflag = 1;
}
 | 
<html><head> <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS"> <title>$title</title> </head>  | 
    print "<html>\n";                        
    print "<head>\n";
    print "</head>\n";
    print "<body>\n";
    print "おはよう\n";
    print "</body>\n";
    print "</html>\n";
 | 
<html> <head> </head> <body> おはよう </body> </html>  | 
print <<"EOM"; # ヒアドキュメント開始 EOM # ヒアドキュメント終了  | 
# ------------------------- #
# Sub Style
# スタイルシート
# ------------------------- #
sub style {
    print "<STYLE TYPE=\"text/css\">\n";
    print "<!--\n";
    print "A:link {text-decoration: none }\n";
    print "A:visited {text-decoration: none }\n";
    print "body,tr,td,th { font-size:$fontsize }\n";
    print "-->\n";
    print "</STYLE>\n";
}
 | 
# ------------------------- #
# Sub Style
# スタイルシート
# ------------------------- #
sub style {
print <<"EOM";
<STYLE TYPE="text/css">
<!--
A:link {text-decoration: none }
A:visited {text-decoration: none }
body,tr,td,th { font-size:$fontsize }
-->
</STYLE>
EOM
}
 | 
# ------------------------- #
# Sub Style
# スタイルシート
# ------------------------- #
sub style {
print <<"EOM";
<STYLE TYPE="text/css">
<!--
body{ background:url("kabegami.gif") #ffffff fixed; color:#606060; font-size:10pt;} # 1行目
tr,td,th{ color:#606060; font-size:10pt;}                                           # 2行目
small{ font-size:9pt;}                                                              # 3行目
a:link,a:visited,a:active{ text-decoration:underline; color:#606060;}               # 4行目
a:hover{ text-decoration:none; color:#ffffff; background-color:#606060;}            # 5行目
-->
</STYLE>
EOM
}
 | 
# ボディーの設定 $body = '<body bgcolor="#FFFFFF" text="#000000" link="#000000" vlink="#000000" alink="#000000">'; # テーブルの設定 $table = '<table width="280" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FF9999">';  | 
# ------------------------- #
# Sub Body Top
# ボディ上部
# ------------------------- #
sub bodytop {
print <<"EOM";
<div align="center">
$table
<form method="$method" action="$cgiurl">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="$barcolor">
<tr>
<td valign="top"><img src="$img$ltimg" width="$ris" height="$ris"></td>
<td><div align="center">$font1$_[0]</font></div></td>
<td valign="top"><div align="right"><img src="$img$rtimg" width="$ris" height="$ris"></div></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
EOM
}
 | 
# ------------------------- #
# Sub Body Bottom
# ボディ下部
# ------------------------- #
sub bodybottom {
print <<"EOM";
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="$barcolor">
<tr>
<td valign="bottom"><img src="$img$lbimg" width="$ris" height="$ris"></td>
<td><div align="center">
EOM
    print "<a href="$backurl" target="$backtarget">[$backword]</a>\n" if $printback == 1;
    print " <a href="$cgiurl?mode=owner&name=$FORM{'name'}&pass=$FORM{'pass'}">[飼い主ランキング]</a>\n" if $actionflag == 1;
    if ($FORM{'mode'} eq "owner") {
        print " <a href="$cgiurl?mode=back&name=$FORM{'name'}&pass=$FORM{'pass'}">[戻る]</a>\n";
    }
    elsif ($FORM{'mode'} ne "end") {
        print " <a href="$cgiurl?mode=end">[終了]</a>\n";
    }
print <<"EOM";
</div></td>
<td valign="bottom"><div align="right"><img src="$img$rbimg" width="$ris" height="$ris"></div></td>
</tr>
</table>
</td>
</tr>
</form>
</table>
</div>
EOM
}
 | 
    &bodytop('タイトルなど');
    print '真ん中部分';
    &bodybottom;
 | 
  | |||
| 真ん中部分 | |||
  | 
# ------------------------- #
# Sub tabletop
# テーブル上部
# ------------------------- #
sub tabletop {
print <<"EOM";
<table width="100%" border="0" cellspacing="$f_space" cellpadding="0">
<tr>
<td>
EOM
}
 | 
# ------------------------- #
# Sub tablebottom
# テーブル下部
# ------------------------- #
sub tablebottom {
print <<"EOM";
</td>
</tr>
</table>
EOM
}
 | 
    &bodytop('タイトルなど');
    &tabletop;
    print '真ん中部分';
    &tablebottom;
    &bodybottom;
 | 
  | |||
  | |||
  |