grap returns the element that matched, which may be 0 or some other false value. So you can't use this module to find out if 0 is a member of some array. (This is no longer true since you've edited your post.)
You could use the prototype (&@) to make your grap easier to call.
By the way, your subroutine is not different from first() in List::Util. (This is no longer true, either.)
In reply to Re: RFC: Text::Grap
by betterworld
in thread RFC: Text::Grap
by kwaping
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |