in reply to Comparing Dates

print "$date_a\n$date_b\n"; print "Do these dates differ by more than 72 hours? "; my $ans = <>; my $differ_by_more_than_72; if( $ans =~ /[Yy][Ee][Ss]/ ) { $differ_by_more_than_72 = 1; } else { $differ_by_more_than_72 = 0; }

Of course if you'd given more information like what format your input dates are in someone might could give you a slightly better answer, but other than the above you're probably just going to get pointers at some Date module on CPAN.

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.