#!/usr/bin/perl -w use strict; use Date::Simple ('date', 'today', 'ymd'); my $year = today()->year; print "Enter the month of the first date:\n"; chomp(my $month1 = ); print "Enter the day of the first date:\n"; chomp(my $day1 = ); print "Enter the month of the second date:\n"; chomp(my $month2 = ); print "Enter the day of th second date:\n"; chomp(my $day2 = ); my $date1 = ymd($year, $month1, $day1); my $date2 = ymd($year, $month2, $day2); my $diff = $date2 - $date1; print "Difference is $diff.\n";