in reply to Array bounds checking

Arrays don't have a fixed size, but you could make an object that stores an array and enforces its size during updates. There may already be tied arrays and such available on CPAN.

Wanting a fixed-size array in the first place smells a bit odd in itself to me. What is your use case?

Replies are listed 'Best First'.
Re^2: Array bounds checking
by davehorsfall (Novice) on Sep 09, 2014 at 21:16 UTC

    I seem to be forever coming up with odd use cases. This one is a puzzle-solver, involving a 10x10 numeric grid of 1's and 0's (Binary Brainsnack if you're familiar with it). In hindsight I probably would've chosen another data structure.

    -- Dave

      In hindsight I probably would've chosen another data structure.

      It's never too late to refactor your code.