S
sam
Hi,
I used the following perl code display date , month and year, but the
year is shown as 104 instead of 2004:
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime time;
print "Month: ".$mon."\n";
print "Year: ".$year."\n";
Result:
It is now Sat Dec 25 11:11:01 2004
Month: 11
Year: 104
What is the correct way to retrieve the value of the year?
Thanks
Sam
I used the following perl code display date , month and year, but the
year is shown as 104 instead of 2004:
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime time;
print "Month: ".$mon."\n";
print "Year: ".$year."\n";
Result:
It is now Sat Dec 25 11:11:01 2004
Month: 11
Year: 104
What is the correct way to retrieve the value of the year?
Thanks
Sam