in reply to Array bounds checking

It's already been hinted that you could solve this with an OO solution. Actually, I'd have started with the board implemented as an object just so I could hide the "under the hood" board representation details and manipulate it at a high level that makes it easy to separate the puzzle solving logic from the board manipulation code.

Perl is the programming world's equivalent of English