for my $r (@rand) { return 0 if $a[$r] ne $b[$r]; } return 1;