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


in reply to Re^2: Array mysteriously growing
in thread Array mysteriously growing

Aye. I prefer the way I did it because it uses $i+1 in both places.