In both cases the loop variable is set to "1" by some mysterious force, and in both cases warn must be called without arguments to trigger the bug.
Update: I've added the code from that bug report under the readmore tags.
use strict; use warnings; my @examples = ( { name => 'Test Eins', }, { name => 'Test Zwei', }, ); my @do_examples = (0, 1); for my $foo (@examples[@do_examples]) { my $testname = $foo->{name}; # line 17 print "$testname...\n"; local $@; eval { die 'hallo'; 17; } or do { warn; }; }
In reply to Re: Strange warn behavior in loop
by betterworld
in thread Strange warn behavior in loop
by deibyz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |