The above code returns 1 if element found, undef if not found.$X = "x"; @array = qw / x y z 1 2 3 /; return exists {map { $_ => 1 } @array}->{$X};
In reply to Re: How to find out if X is an element in an array?
by Roger
in thread How to find out if X is an element in an array?
by juahonen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |