in reply to Strange warn behavior in loop

This reminds tinita and me of this bug.

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; }; }