in reply to accessing hash of arrays

If you can store the values of the hash in a list, then you can access its elements by their indices.

my %hash = ( 4 => [10, "mango"] , 2 => [04, "banana"] , 3 => [20, "apple"], ); foreach (keys %hash){ print "$_: $hash{$_}[0]\n"; }

Replies are listed 'Best First'.
Re^2: accessing hash of arrays
by tmharish (Friar) on Aug 21, 2009 at 07:52 UTC
    Ya! ... My mistake.