in reply to Test binary equality?

Your actual code does not really contain a bareword "N" between square brackets, does it? That would be bad. Show us more code, because (as the other reply says) the eq comparison of two 512-byte array elements should do the right thing (report true iff the two elements are in fact identical), as demonstrated below:
#!/usr/bin/perl use strict; my @array; my $bgn = 0; for ( 0..2 ) { push @array, pack( "c*", $bgn .. $bgn+511 ); $bgn += 128; } # pack "c*" will only use the low 8 bits and strip off the higher ones +, so # $array[0] will be identical to $array[2] for ( 1, 2 ) { my $cmp = ( $array[0] eq $array[$_] ) ? "matches" : "differs from" +; print "element 0 $cmp element $_\n"; } __OUTPUT__ element 0 differs from element 1 element 0 matches element 2