http://www.perlmonks.org?node_id=1016757


in reply to Re^2: date::manip question
in thread date::manip question

On a side note, perhaps the following may be helpful:

my $date1 = UnixDate( ParseDate($raw_date1) || 'today', "%Y-%m-%d" );

This, instead of checking for an empty string, will either send a successful ParseDate or 'today' to UnixDate. I'd suggest a more comprehensive sanity check on the date data, but this will catch more than just an empty string.