in reply to Re: Creating multidimentional arrays dynamically
in thread Creating multidimentional arrays dynamically

Except unlike C or some other languages, you don't need to specify size of array when creating etc..just add more elements as you see fit.
the hardest line to type correctly is: stty erase ^H
  • Comment on Re^2: Creating multidimentional arrays dynamically

Replies are listed 'Best First'.
Re^3: Creating multidimentional arrays dynamically
by Marshall (Canon) on Aug 13, 2010 at 06:49 UTC
    Actually that sort of stuff happens all the time in C. Hey, let's make row 12 longer (e.g. add more "columns" to that specific row) or add more rows overall. You may be thinking of what I call "traditional C 2D arrays" vs dynamically created arrays.

    Now having said that, you have to write a lot more code to make all that work in 'C' than you have to write in Perl. That is for sure! Perl arrays were designed to be easy to use and they are! A Perl AoA has essentially the same approach as a dynamic C 2D array, i.e. the first part is a array of pointers to arrays that describe the rows.