#!/usr/bin/perl use strict; use warnings; use Date::Manip; my $now = ParseDate 'now'; my $then = ParseDate 'next month'; substr($then,6,2) = 21; my $delta = DateCalc $now, $then; my $seconds = Delta_Format $delta, 0, '%sh'; print "seconds=$seconds days=", $seconds/(60*60*24), "\n";