http://www.perlmonks.org?node_id=1019002


in reply to garbage at end of string in strptime

The error message is telling you exactly what the error is: you have an extra 2 that it can't format. For example, an example with garbage 2:
#!/usr/bin/perl -l use strict; use warnings; use Time::Piece; my $time = Time::Piece->strptime( "2013-02-15 19:07:292", "%Y-%m-%d %H:%M:%S"); print $time;
Now without the extra 2:
#!/usr/bin/perl -l use strict; use warnings; use Time::Piece; my $time = Time::Piece->strptime( "2013-02-15 19:07:29", "%Y-%m-%d %H:%M:%S"); print $time;
Does that help? If not, please post your code, and we'll go from there.