use strict; use warnings; use Date::Calc qw(Delta_Days Decode_Date_US Today); my $date1 = '1/1/2010'; # Supose date is in US format my ( $year , $month , $day ) = Today(); my ( $year1, $month1, $day1 ) = Decode_Date_US($date1); my $dd = Delta_Days( $year1, $month1, $day1, $year, $month, $day ); print "There were $dd days between Today and $date1\n";