in reply to Re^2: without looping, check if $var is found in @list
in thread without looping, check if $var is found in @list

It really is not clear what you are trying to do (and your extra reply doesn't help much either). Your description ("if the very first row does not match, NOTHING matches") is what I would expect, based on the snippet -- the data coming from the fetch would appear to have no bearing at all on whether your "@choices" array contains a match for the "$name" param.

Based on the snippet you've presented, it looks like the same condition (with the same data, and therefore producing the same result) is being repeated on every iteration over the "while ()" loop.

BTW, please consider signing up as a regular PerlMonks user (rather than Anonyous Monk), so you can get notifications of replies to your posts, and can update your posts when you want to (instead of posting more replies). It's harmless.

  • Comment on Re^3: without looping, check if $var is found in @list