wncryptorg demerphq wrote nobull brian mccauly reports heres much simpler way reproduce use strict use warnings outside loop pass 1 2 print 1n later inside loop __end__ could reasonably expected print outside loop twice actually prints later inside loop second time workround simply double use strict use warnings outside loop pass 1 2 print 1n later inside loop fwiw behaviour two examples would expected though think second case bit initially expected exactly first case perlvar contains subpattern corresponding set capturing parentheses last pattern match counting patterns matched nested blocks exited already mnemonic like digits variables readonly dynamically scoped current block unfortunate documentation carefully define means nested block point view read access 1 examples inner match occurring nested block point view program whole second case certainly contains nested block first case might might depending nested means first case also either might might exited block nested depending precisely exited means interpretation hasnt exited block yet thats sentiment based limited understanding implementation documentation work documentation supposed saying words mean maybe better chance deciding whether implementation matches fixing hugo tue 05 aug 2008 151705 0100 regex issue scoping loops