in reply to scalar localtime() to timestamp
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)
|
|---|