in reply to How do I print errors

I have a script that seems to fail when it is scheduled.

I suspect that this is a cron job then. One quick and dirty way of handling this would be in the crontab.

10 * * * * /path-to/your-prog.pl >> /path-to/log 2>&1

Any STDOUT and STDERR will be captured & written to your log.

-- vek --