in reply to scalar localtime() to timestamp

There are two C time.h functions that make parsing dates fairly easy and straightforward: strftime() and strptime(). Time::Piece gives you access to both of these, i would use strptime() to get your date back. Here is a test script:
use strict; use warnings; use Time::Piece; my @str = ( 'Thu Oct 9 16:58:28 2003', 'Mon Nov 10 06:08:08 2003', 'oops', ); for (@str) { my $time; eval { $time = Time::Piece->strptime($_,'%a %b %d %T %Y'); }; warn "bad time: '$_'\n" and next if $@; print join(',', map $time->$_, qw(second minute hour fullday fullmonth year) ); }

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)