use Data::Dumper; print Dumper \@dmy; return timelocal(0, 0, 0, @dmy) / (24 * 60 * 60);