#!/usr/bin/perl -w use strict; use Time::Local; print "Enter the first month:\n"; chomp (my $m1 = ); print "Enter the first day:\n"; chomp (my $d1 = ); print "Enter the second month:\n"; chomp (my $m2 = ); print "Enter the second day:\n"; chomp (my $d2 = ); my $y = 2003; my $difference = int( (timelocal(0,0,0,$d1,$m1,$y) - timelocal(0,0,0,$d2,$m2,$y))/24/60/60 +0.5); print "$difference\n";