How to find out if a certain value is in a list?
- From: "TN" <tjpn@xxxxxxxxxxxxxxxxxx>
- Date: Thu, 20 Jul 2006 12:07:44 +0300
Hi there,
what would be the shortest (or best...) way to find out if a certain value
is in the list like in the code here:
my @resultarray = &somefunc("case"); # returns a list (1,3,5,7,9) in this
case
# now I need to know whether 7 is in the @resultarray or not
if (...) {
# 7 was in the @resultarray
} else {
# 7 was not in the @resultarray
}
Greetings,
TN
.
- Follow-Ups:
- Re: How to find out if a certain value is in a list?
- From: Tad McClellan
- Re: How to find out if a certain value is in a list?
- From: anno4000
- Re: How to find out if a certain value is in a list?
- Prev by Date: Re: Unable to lock a file to stop sendmail writing to it
- Next by Date: Re: Unable to lock a file to stop sendmail writing to it
- Previous by thread: Unable to lock a file to stop sendmail writing to it
- Next by thread: Re: How to find out if a certain value is in a list?
- Index(es):