in reply to Check if element in One Array Exist in Other Array
You bail out as soon asthe first element of @$test doesn't equal all elements of @$source.
See what's compared in the line marked above:foreach my $ts ( @{$test} ) { foreach my $sc (@{$source} ) { if ( $ts ne $sc ) # <- You will fail here { print "FALSE\n";
1. loop: 'A' ne 'A' -> okay. They are equal 2. loop: 'A' ne 'B' -> TRUE So fail...
|
|---|