# construct %translator as before, but only for unique keys for (@code_data) { push @{$translator{$_->[currency]}}, $_; }