日付を表示(localtime time)
#! /usr/local/bin/perl # 日時取得 ($sec, $min, $hour, $day, $mon, $year) = localtime time; $year += 1900; ++$mon; # HTML出力 print "Content-type: text/html\n\n"; print "<html>\n"; print "<head>\n"; print "<title>日付を表示</title>\n"; print "</head>\n"; print "<body>\n"; print "$year年$mon月$day日<br>\n"; print "</body>\n"; print "</html>\n"; exit;
〔 実行する 〕