in reply to Time::Piece strangeness

Are you stuck with Time::Piece ? Two alternatives from Date::Calc are to either use the check_date() method after manually split'ing the string:
[davidrw@host ~]$ perl -MDate::Calc=check_date -le 'print check_date(r +everse split /-/, "31-02-2006" )?1:0' 0 [davidrw@host ~]$ perl -MDate::Calc=check_date -le 'print check_date(r +everse split /-/, "28-02-2006" )?1:0' 1
or to use the Decode_Date_EU() method to do the parse/check all at once:
[davidrw@host ~]$ perl -MDate::Calc=Decode_Date_EU -le 'print join ":" +, Decode_Date_EU("31-02-2006")' [davidrw@host ~]$ perl -MDate::Calc=Decode_Date_EU -le 'print join ":" +, Decode_Date_EU("28-02-2006")' 2006:2:28