Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Byte ranges of binary files

by zork42 (Monk)
on Jul 28, 2013 at 05:19 UTC ( [id://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; ^^^
?

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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-20 00:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found