Please don't -- me before reading on. I know this is a FAQ, and I know the answer(s) in the FAQ. I also know it's in the Q&A section here (although some of the answers there are rather strange...).
It's just that a couple of times recently I've come across this sort of thing:
my @array = qw ( a b c d x ); my $sought = 'a'; print 'Found!' if index ("@array", $sought) > -1;
So, my question: is there anything wrong with this? (if there is, I'm quite happy to forget I ever saw it :-).
TIAIn reply to Is X in my array? by Not_a_Number
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |