in reply to Comparing the bytes of a file

The solution is simple, read command accepts the following parameters: FILEHANDLE,SCALAR,LENGTH,OFFSET. You can also use sysread, but you can read about these commands using perldoc read and perldoc sysread.

In my little experience, it can be very helpful to read man pages even if you don't need; it is a nice way to learn new things about Perl :)

Ciao, Valerio

Update: sorry, I misunderstood the question.