Rather than getting the current date using `date`, why not use POSIX::strftime to get it in YYYY-MM-DD format. You can then use standard string comparison operators on the two dates.
use POSIX 'strftime'; my $now = strftime('%Y-%m-%d', localtime);
Date::Manip is probably overkill for this task (in fact it's probably overkill for most tasks.)
Originally posted as a Categorized Answer.
In reply to Re: How do I Compare Dates
by davorg
in thread How do I Compare Dates
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |