C:\@Work\Perl\monks >perl -Mstrict -Mwarnings use Data::Dumper; use constant { HEIGHT => 0, COLOR => 1, WEIGHT => 2, }; my %HoAoA; while () { chomp; my ($key, $height, $color, $weight) = split; push @{ $HoAoA{$key} }, [ $height, $color, $weight ]; } print Dumper \%HoAoA; print "'ef56' second color is $HoAoA{'ef56'}[1][COLOR]"; __DATA__ ef56 2.6 red 4 ef42 2.8 green 3 ef56 9.8 blue 7 ^Z $VAR1 = { 'ef56' => [ [ '2.6', 'red', '4' ], [ '9.8', 'blue', '7' ] ], 'ef42' => [ [ '2.8', 'green', '3' ] ] }; 'ef56' second color is blue