my %aliases_for_things = map split(/ /,$_,2), map uc, @somearray; return %aliases_for_things; #### return map split(/ /,$_,2), map uc, @somearray; # FIRST and LAST names #### my @labels_and_values = map split(/ /,$_,2), map uc, @somearray; return @labels_and_values; #### my @flattened_pairs; foreach my $thing (@somearray) { my $upper_thing = uc $thing; my @pair = split / /, $upper_thing, 2; push @flattened_pairs, @pair; } return @flattened_pairs;