Help for this page
sub map_pairs(&@) { my $f = shift; my @res; ... push @res, $f->($a,$b) while ($a, $b) = splice @_, 0, 2; return @res; }
map_pairs { $a } qw/a b c d/; # ac map_pairs { $b } qw/a b c d/; # bd map_pairs { uc($a),lc($b) } qw/a b c d/; # AbCd