in reply to Re: How can I merge data using a hash?
in thread How can I merge data using a hash?

could you explain this:
$hash{$1}->[0] = $2
is it a reference to an array? so the key is $1...

Replies are listed 'Best First'.
Re^3: How can I merge data using a hash?
by TedPride (Priest) on Oct 10, 2004 at 23:35 UTC
    Yes, it's a reference to an array. For instance:
    $hash{$1}->[0] = $2; $ref = $hash{$1}; print @$ref[0];
    $ref points to the array. @$ref is the array that $ref points to.