in reply to without looping, check if $var is found in @list

I'd have to agree with duckyd on this one. A hash is probably the way to go on this one. This is my version..
my @choices = qq(one two three four five); my %choices; $choices{$_}++ for @choices; while ($sth->fetch) { if (exists $choices{$var}) { # } }


"Age is nothing more than an inaccurate number bestowed upon us at birth as just another means for others to judge and classify us"

sulfericacid