foreach (@sorted_data) { /\./; $hash{$`}=$'; } # print hash here by key value - only latest entry exists