Don't ask to ask, just ask | |
PerlMonks |
Re: timelocal error when executed twice.by almut (Canon) |
on Oct 19, 2009 at 17:48 UTC ( [id://802051]=note: print w/replies, xml ) | Need Help?? |
Don't use $y-=1900, use $y-1900 instead. As you have it, your value will be decremented twice, yielding an invalid year the second time. (I'm supposing you're setting $y once somewhere at the beginning — though you haven't shown it...) P.S.: In case anyone wonders (as I did) why when the module croaks the year value is reported as 109 (though it isn't)... that's because the module does:
In Section
Seekers of Perl Wisdom
|
|