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)
In reply to Re^3: How does map work?
by LanX
in thread [Solved] How does map work?
by three18ti
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |