>267

俺ならこんな感じ。チェックしてない。

open (FILE,"xxx.dat"); @page = (<FILE>); close (FILE);
$page[0] =~ s/\n//g;
$page[1] =~ s/\n//g;

print <<"EOH";
Content-type: text/html; charset=Shift_JIS

<html>
<head>
<title>$page[0]</title>
</head>
<body>
<h1>$page[0]</h1>
<h2>$page[1]</h2>
EOH

$count = @page;
for($i = 2;$i <= $count; ++$i) {
$$page[$i] =~ s/\n/<BR>\n/g;
print $page[$i];
}
print "</body></html>";