in reply to Re^2: How does map work?
in thread [Solved] How does map work?

Hmm seems like HOP doesn't show how to reimplement plain map.

But as a side note, perlsub has an example for grep :

And here’s a reimplementation of the Perl "grep" operator: sub mygrep (&@) { my $code = shift; my @result; foreach $_ (@_) { push(@result, $_) if &$code; } @result; }

HTH!

Cheers Rolf

( addicted to the Perl Programming Language)