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


in reply to Re: Surpised by foreach iterator limitation
in thread Surpised by foreach iterator limitation

It is not different in such a way as to prevent a suitable implementation from functioning. Yes, it would require a little bit of magic, but no more than the magic already provided by local(). Where there is a will, ... This is Perl people... :-)