in reply to Re^2: add element to hash
in thread add element to hash

Please take a close look at the code Athanasius (++) posted - I believe that is very close to what you are trying to do - except his code has the correct syntax.

The only thing I can guess differently about how your structure might look is to replace the initial hash assignment with:

my %hash = ( key1 => [ @array1, @array2, ], # Assign array elements, not refere +nces. );

        "You're only given one little spark of madness. You mustn't lose it."         - Robin Williams