This may be simplistic, but what about the following code. Anyone?
# # Given: first value passed is the element to check for # Given: remaining values are the array to check in # sub find_in_list { my ($element, @list2check) = @_; return(scalar(grep($element, @updatelist))); }
In reply to Re: Answer: How to find out if X is an element in an array?
by atcroft
in thread How to find out if X is an element in an array?
by juahonen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |