in reply to Compare Binary Files

If you're just trying to see if they are different:

open(my $fh1, '<', $file1) or die $!; binmode($fh1); open(my $fh2, '<', $file2) or die $!; binmode($fh2); local $/ = \(64*1024); # Tweak as desired. for (;;) { my $blk1 = <$fh1>; my $blk2 = <$fh2>; last if !defined($blk1) && !defined($blk2); die("diff\n") if !defined($blk1) || !defined($blk2) || $blk1 ne $blk2; }

Might want to save time by pre-checking the size of the files.

It would be trivial to modify this code to output the bytes that differ.

Detecting insertions and deletions is a whole other story, though.