http://qs321.pair.com?node_id=400532

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

if I have
$foobar='D';
@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