What if your range isn't a whole number of $readsz chunks?
I'd do something like this :-
while ($myrange) { $myrange -= read($fh, $buf, min($myrange,$readsz) ) or last; # do stuff }
In reply to Re: Byte ranges of binary files
by RichardK
in thread Byte ranges of binary files
by PearlsOfWisdom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |