in reply to Re: Forgetting your good education
in thread Writing a perl quiz. Need advice.

Uhm, isn't "fatalsToMyLogFile" default behaviour under just about every webserver there is? I only have (some) experience with apache and afaik fatals do end up in the error log on apache.

Replies are listed 'Best First'.
Re: Re: Re: Forgetting your good education
by crenz (Priest) on Mar 08, 2003 at 20:08 UTC

    Yes, but not everyone has access to their webserver's error log file... (think accounts on most hosting providers)

      Then create your own logfile. Something like:
      BEGIN { open STDERR, ">>/home/myowndir/errorlogs.txt"; }
        Or to keep the nice CGI::Carp formatting for logged errors:
        BEGIN { use CGI::Carp qw(carpout); my $fn = "/home/joeschmoe/logs/foo_log"; open my $fh, ">>", $fn or die "Unable to open $fn for appending: $!\n"; carpout($fh); }

        Makeshifts last the longest.