Help for this page

Select Code to Download


  1. or download this
    my %aliases_for_things = map split(/ /,$_,2), map uc, @somearray;
    return %aliases_for_things;
    
  2. or download this
    return map split(/ /,$_,2), map uc, @somearray; # FIRST and LAST names
    
  3. or download this
    my @labels_and_values = map split(/ /,$_,2), map uc, @somearray;
    return @labels_and_values;
    
  4. or download this
    my @flattened_pairs;
    foreach my $thing (@somearray) {
    ...
      push @flattened_pairs, @pair;
    }
    return @flattened_pairs;