in reply to Re^2: push an array into Hash of Array
in thread push an array into Hash of Array

Is q{first} == 'first'
Yes, see perlop.

Why use it? I find it easier to parse than ' and have adopted braces as delimiters and tend to stick to them. ymmv.

In this case though $hash{first} works find (no need for either).

Replies are listed 'Best First'.
Re^4: push an array into Hash of Array
by alittlebitdifferent (Initiate) on Oct 26, 2011 at 03:18 UTC
    But are you really 'storing' the arrays in that hash...or just the a reference to those arrays?

    If I undef array1 and array2..will I still have values in my hash?

    Or if I tie the Hash to a DB file. Will the file contain the contents of each of the arrays...or just the array references?

      Only scalars can be hash values (see perlref). Therefore, you cannot "store an array" into a hash. You can only store the reference.