in reply to looking for simple way to check scalar against array

my @array = (1,2,3..9,-12); foreach my $variable (@array) { print "$variable is in the list\n"; }

That something like what you want?

Update: Oops, looks like I didn't really understand what you wanted, everyone else's suggestions are better :)

----------
My cow-orkers were talking in punctuation the other day. What disturbed me most was that I understood it.