in reply to Loop controls transcends scope?
If you ask Perl to tell you about weird things by using the warnings pragma, or launching Perl with the -w command line switch, it will tell you:
>perl -we "sub nxt { next }; for (1..3) { nxt if /2/}" Exiting subroutine via next at -e line 1.
|
|---|