in reply to html output to a file

I would let the cronjob or a wrapper script do the redirction for you:

10 * * * * /path/to/my/cgi > /home/output.htm 2>&1
If you're going to do a lot of this *baking* take a look at Industrial Strength Publishing.

-derby

update: Yikes! Sybase::DBlib ... I prefer DBI and DBD::Sybase but at least take a look at Perl with Sybase: sybperl or DBI/DBD::Sybase?