I've tried on some of the systems I have at hand, and it looks like a v5.8.8 bug :
Confirmed under the Redmondish side of the world, too:
C:\temp>perl -e "for (2,2) {print;warn}" Warning: something's wrong at -e line 1. Warning: something's wrong at -e line 1. 21
Note that I wanted to further simplify the test code, but the bug doesn't seem to show up with a c<for> statement modifier:
C:\temp>perl -e "print,warn for 2,2" Warning: something's wrong at -e line 1. Warning: something's wrong at -e line 1. 22
BTW: what if $@ is set?
C:\temp>perl -e "$@='all your base are belong to us';for (2,2) {print; +warn}" all your base are belong to us ...caught at -e line 1. all your base are belong to us ...caught ...caught at -e line 1 +. 21
Nope, the bug is still there...
In reply to Re^2: Strange warn behavior in loop
by blazar
in thread Strange warn behavior in loop
by deibyz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |