my %h = map { chomp; (split /\s+/, $_, 2)[0,1] } ; print Dumper \%h; __DATA__ two 2 one three 3 X