Try adding a "use Carp;" and an INIT block like "INIT { $SIG{__WARN__ }=sub { carp "Caught it"; } };"
clueless#!/usr/bin/perl use warnings; use Carp; INIT { $SIG{__WARN__}=sub {carp "gotcha!";}; }; my $code_err = q| my @arr; my $i; $arr[$i] = 0; # line 4 within this code snippet |; my $code_ok = q|my $var = ""|; eval $code_ok for (1..8); eval $code_err; # 9th eval, but line 14 in this script E:\><code> gets me <code>E:\>perl example.pl gotcha! at example.pl line 6 main::__ANON__('Use of uninitialized value in array element at + (eval 9) line 4.\x{a}') calle d at (eval 9) line 4 eval ' my @arr; my $i; $arr[$i] = 0; # line 4 within this code snippet ;' called at example.pl line 17 E:\>type example.pl
In reply to Re^4: How to locate an error in a CGI application
by clueless newbie
in thread How to locate an error in a CGI application
by rbi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |