$test1 = ['A','D','B']; $test2 = ['A','C','B']; $source = ['A','B','C','A','B']; check_array($test1,$source); # Should return False # since "D" doesn't exist in # $source check_array($test2,$source); # Should return True # since all element exist in # $source check_array($test1,$source); sub check_array { my ($test,$source) = @_; OUT: foreach my $ts ( @{$test} ) { foreach my $sc (@{$source} ) { if ( $ts ne $sc ) { print "FALSE\n"; last OUT; } else { print "TRUE\n"; } } } return ; } Thanks beforehand.