in reply to Re: Array of Hashes population
in thread Array of Hashes population

Wow! That's beautiful :) Thank you! So, you can't actually have an array of hashes, only an array of hash references?

Replies are listed 'Best First'.
Re^3: Array of Hashes population
by swampyankee (Parson) on Mar 06, 2008 at 17:37 UTC

    Correct; elements of Perl arrays and hashes must be scalars. One "converts" a variable (@array, %hash) into a reference to a variable by prefixing a backslash(\), so the reference to @array would be \@array. I believe that references can also point to subs, which means that one could have an array which has elements that are, variously, references to hashes, references to arrays, references to subs, references to scalars, and actual scalars.


    emc

    Information about American English usage here and here.

    Floating point issues? Read this before posting: http://docs.sun.com/source/806-3568/ncg_goldberg.html