in reply to Re: "foreach" is to "next" as "map" is to ???
in thread "foreach" is to "next" as "map" is to ???
This is also what returning an empty list is for. grep is just a specialized form of map. Use map when you want to do other work as well.
grep { TEST } map { TEST ? $_ : () }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: "foreach" is to "next" as "map" is to ???
by calin (Deacon) on May 26, 2004 at 17:17 UTC |