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.
In reply to Re: Comparing Dates
by Fletch
in thread Comparing Dates
by perl_99_monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |