Is that the right way, or there's a better or correct one?sub isListMember { my ($array, $item) = @_; # array ref, item for (@{$array}) { if (/^\d+$/) { return $TRUE if ($_ == $item); } else { return $TRUE if ($_ eq $item); } } $return $FALSE; }
In reply to Re: Is list member
by hotshot
in thread Is list member
by hotshot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |