in reply to Split results of Map function

As pointed out above, your sample data and your description of the task will lead to the same numeric string being treated as a hash key for several distinct values.

Based on what you describe as the desired output, it looks like you want to keep just the first value assoicated with a given key, and ignore later values. (But you didn't actually say this, so I'm just guessing.) If that is the case, you would want to alter the code in one of the earlier replies so that you check for the existence of a hash key before you assign a value to it. Using thesa's solution, for instance:

my %hash = (); while(<DATA>) { chomp; my ($k, $v) = split / \s+ \d+ , \s+ /x; $hash{$k} = $v unless exists $hash{$k}; }
This will make sure that once a value is assigned to a given hash key, no other value will be assigned to that key (assuming this is what you want).