http://www.perlmonks.org?node_id=1014775


in reply to Re^4: foreach-loop-local var in sub
in thread foreach-loop-local var in sub

Which is what I use all the time now ;) But it feels kinda hacky, even though it works and even though it's actually documented behaviour. Getting "real" lexically scoped subroutines would feel less work-aroundish.