Perl, a subroutine that takes in a date string of various format and return date string in format yyyy-mm-dd
Need a subroutine that takes in a date string of various format and return date string in format yyyy-mm-dd. If date is not a valid date then rerun 0; I would prefer if you use any of the Perl date library.