in reply to Byte ranges of binary files

(1) For portability, remember to put the file into binmode immediately after opening it.

(2) Also, do you have an off-by-1 error?
Should
my $myRange = $rangeEnd - $rangeStart;
actually be
my $myRange = $rangeEnd - $rangeStart + 1; ^^^
?

Replies are listed 'Best First'.
Re^2: Byte ranges of binary files
by PearlsOfWisdom (Initiate) on Jul 28, 2013 at 08:12 UTC

    Re: Also, do you have an off-by-1 error? Hmm .... I spend hours on end staring at my computer screen and trying all the examples posted here and I still couldn't get the program to work like I think it should be. ;-(

    Perhaps I'll go back to my initial code and try with the amended range. Will let you know how it goes.