Help for this page

Select Code to Download


  1. or download this
    my %newhash =                           # keys/values into a hash
                  map  { $_ => $hash{$_} }  # a list of keys/values
                  grep {     foo($hash{$_}) # just the keys we want
                         and bar($hash{$_}) }
                  keys %hash;               # a list of keys in %hash