in reply to Carpout makes script run, but outputs no errors?

Hmmm - Moritz & Anonymous Monk got me thinking, and I changed it to:
BEGIN { use CGI::Carp qw(carpout); open(ERROR_LOG, ">>my_error_log") or die("my_error_log: $!\n"); carpout(\*ERROR_LOG); }
And low & behold, there's my error output - mostly uninitialized values used in comparisons and concatenations. I've been pasting together old subroutines and some variables used in the subroutines but not in my application are not getting initialized for a few records.

I'll fix all that and see if it then runs without this.

Thanks.

Update: yep, that did it.




Time flies like an arrow. Fruit flies like a banana.

Replies are listed 'Best First'.
Re^2: Carpout makes script run, but outputs no errors?
by moritz (Cardinal) on Sep 23, 2008 at 15:06 UTC
    This demonstrates yet again that copy&paste is the programmer's devil - so tempting, so easy, and yet evil and fraught with peril.