%h = ( key1 => 123, key2 => 'acb', key3 => 5, ); # create second hash with only numeric values %h_numbers = grep2 { looks_like_number($_[1]) } %h; # prefix all values with "p" %h_prefixed = map2 { ($_[0], "p".$_[1]) } %h; @a = ( p1 => 111, p2 => 222, p3 => 333 ); # transforms array of ordered couples to array of single element hashes @a_hashed = map2 { +{ $_[0] => $_[1] } } @a;