in reply to getting answer 70 years off

Hello. I'm curious if there is any reason you aren't using something like the DateTime module for this from CPAN? You could start with:
use strict; use warnings; use DateTime; my $dt = DateTime->today();
and do all the other stuff you need after that.. also, is $entry an argument from the command line or line from a file? Also, I think I needed to use Date::Format for localtime formatting stuff