consider this code:
1 #!/usr/bin/perl
2 # test bugger
3
4 $x = 0;
5
6 $i++;
7
8 for ($i = 0; $i/$j < 100; $i++) {
9 $k = 0;
10 last if $i/0;
11 $k++;
12 }
13 print "darn";
If you run this, the div-by-zero problem is reported at line 12 instead of line 8.
Also, if you run it in the debugger, the debugger fails to catch the exception
and bails out unexpectedly.
--tom
1 #!/usr/bin/perl
2 # test bugger
3
4 $x = 0;
5
6 $i++;
7
8 for ($i = 0; $i/$j < 100; $i++) {
9 $k = 0;
10 last if $i/0;
11 $k++;
12 }
13 print "darn";
If you run this, the div-by-zero problem is reported at line 12 instead of line 8.
Also, if you run it in the debugger, the debugger fails to catch the exception
and bails out unexpectedly.
--tom