Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

if I have
@array=('A', 'B', 'C', 'D');

is there a way I can compare $foobar to every @array value in a single if statement? without a loop?

for example...

if($foobar eq @array[0 to 3]{ #yadda yadda }

I dont think that works, but it might help describe what Im saying better... thanks