in reply to date and time

Your Code is
my ($day, $month,$year) = (localtime)[3,4,5]; print "$day\-".$month+1."-".$year+1900."\n";
When you get the month data, It's stored under $month.
if $month is 11 then, $month+1 is 12 and not 00.

Looks like you are new to perlmonks.
Read I want to ask a question of the Perl Monks. Where do I start?.
Also read Writeup Formatting Tips and (OBE) The Perl Monks FAQ.
Aritst.