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

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.

  • Comment on Re^3: Creating multidimentional arrays dynamically