⭐ in reply to How to find out if X is an element in an array?
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};
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Answer: How to find out if X is an element in an array?
by NetWallah (Canon) on Sep 10, 2003 at 06:29 UTC |
In Section
Seekers of Perl Wisdom