Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Byte ranges of binary files

by zork42 (Monk)
on Jul 28, 2013 at 05:19 UTC ( #1046708=note: print w/ replies, xml ) Need Help??


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; ^^^
?


Comment on Re: Byte ranges of binary files
Select or Download Code
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1046708]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (11)
As of 2014-07-11 04:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (218 votes), past polls