in reply to convert a given YYYY-MM-DD to epoch time

Your main requirement seems to simply be to "determine what day it was," and you can do that with several CPAN modules. I really like Time::Piece

use strict; use warnings; use Time::Piece; my $date = shift || '1999-12-31'; my $time = Time::Piece->strptime( $date, '%Y-%m-%d' ); print $time, $/; print $time->fullday, $/;

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)