in reply to map2 {} grep2 {} ...

Define them yourself:

sub map2(&@){ my $code = shift; map $code->( shift, shift ), 0 .. $#_/2 } sub grep2(&@){ my $code = shift; map{ my @pair = (shift,shift); $code->( @pair ) ? @pair : () } 0 .. $#_/2 }

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: map2 {} grep2 {} ...
by jozef (Sexton) on Jul 14, 2011 at 13:56 UTC
    Works like a charm! Thank you very much.
Re^2: map2 {} grep2 {} ...
by locked_user sundialsvc4 (Abbot) on Jul 14, 2011 at 15:37 UTC

    An excellent suggestion.   Fav’d.   The best way to solve a problem is not just “a solution that works,” but, as here, “a solution that is abundantly clear.”   Something that gives you, not only the ability to do something, but a way to point out to your successor what you are doing and why you are doing it ... to capture the original designer’s intent.