in reply to checking array elements aginst another array

Do you want to try something like this?
#!/usr/bin/perl use strict; my @test_arrays = qw( a e b c ); my @check_arrays = qw( b a ); foreach my $i (@test_arrays) { print "Not found - $i\n" if ( !grep /$i/, @check_arrays ); }