my %hash=();
my $mykey="key";
my $myval1=$myval2="test";

#store data in a hash of arrays
$hash{$mykey}=[$myval1, $myval2];

Later on I want to retrieve the data and I have to do it like:

$myval1=$hash{$mykey}[0];
$myval2=$hash{$mykey}[1];

There are a lot of array values and I am looking for a more elegant way to
retrieve data, something like
($myval1, $myval2)=$hash{$mykey};  (doesnt work)

I'm sure I am missing something embarrassingly simple. Any help would be
appreciated.

Phillip



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to