古い残念なcgiスクリプトで、以下をよく見かけます。 ($sec,$min,$hour,$mday,$month,$year,$wday,$stime) = localtime();このあたりは、2000年あたりのコードなので、ざっくり忘れましょう。 Perlで時間を扱うモジュールですが、DateTimeとかTime::Pieceがあります。 DateTimeのほうが、いろいろできるようですが、Time::PieceはPerlのコアモジュール(インストールすると入ってる)だったりするので、普段は Time::Pieceで何とかしましょう。 多分、Time::Pieceのほうが軽い。 Usageはmetacpanにて Time::Piece - Object Oriented time objects - metacpan.org use strict; use warnings; use