#! perl -slw use strict; use Data::Dump qw[ pp ]; my %HoA; open my $fh, '<', 'junk.dat' or die $!; /(\S+)\s+(\d+)/ and push @{ $HoA{ $1 } }, $2 or warn "Bad data '$_' at line $.\n" while <$fh>; close $fh; pp \%HoA; __END__ c:\test>junk Bad data 'the quick brown fox ' at line 5 { ernest => [38, 27], jim => [14, 34], john => [23, 44], matilda => [43, 22] }