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


in reply to Control flow revisited

Just to be clear, the reason that that is an error is because the index into the array that you were using was not defined. One way to solve that would be to initialize the variable before the statement.