in reply to Re^2: How does map work?
in thread [Solved] How does map work?
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)
|
|---|