Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Then I put lines like this:my $debug = 0; if($debug && $debug == 1) { OPEN(DEBUG,">>/home/path/logs/debug.txt") or die "Could not Open Fil +e for appending: $!"; }
However, if I update the script, and insert a bunch of lines, my line numbers are all off.print DEBUG "Made it to line 3917 where There was an error ['" . $dbh- +>errstr . "'] in the insert\n" if DEBUG && $debug;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Determining a line number the error occurs on
by adrianh (Chancellor) on Aug 13, 2006 at 13:20 UTC | |
|
Re: Determining a line number the error occurs on
by Fletch (Bishop) on Aug 13, 2006 at 13:26 UTC | |
|
Re: Determining a line number the error occurs on
by imp (Priest) on Aug 13, 2006 at 16:29 UTC | |
|
Re: Determining a line number the error occurs on
by Anonymous Monk on Aug 13, 2006 at 13:48 UTC |