How do I log perl errors to a file of my choice when my perl script dies. For example, I am passing a date to the DateCalc method in Date::Manip. If I pass an invalid date, the script dies. If I run it on the command line, I see the error:
ERROR: Invalid year (928)
at C:/Perl/site/lib/Date/Manip.pm line 5507
Date::Manip:ate_FixYear(928) called at C:/Perl/site/lib/Date/Manip.pm
line 3350...
But I want to view this error later on using a web browser and need to know how to log it. Also I am not running this manually on the command line, it is running from cron. Any help would be appreciated!
Ryan
ERROR: Invalid year (928)
at C:/Perl/site/lib/Date/Manip.pm line 5507
Date::Manip:ate_FixYear(928) called at C:/Perl/site/lib/Date/Manip.pm
line 3350...
But I want to view this error later on using a web browser and need to know how to log it. Also I am not running this manually on the command line, it is running from cron. Any help would be appreciated!
Ryan