in reply to Compare all array values without a loop

Hi,
You can use grep for it.
This uses an implicit loop, but it is quite close to
the syntax you suggest:
my $foobar='D'; my @array=('A', 'B', 'C', 'D'); if ( grep {$_ eq $foobar } @array ) { #yadda yadda };

si_lence