while () { chomp; my ($value, $key) = (split /\s/, $_)[0,3]; $somehash{$key} = $value; }