map and grep aren't flow control operations. They process each element of a list and return a list.
Instead of exiting a map or grep block, return an empty list. (You might also use a function from List::Utils instead, such as first().)
In reply to Re: Ways to control a map() operation
by chromatic
in thread Ways to control a map() operation
by Booger
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |