in reply to Need Help: PERL and Binary Data
read(GIF, $buff, 8 * 2**10) reads a 8192 byte (or the remainder of the file - whichever is smaller) block from the file and puts it in $buff.
You would then typically use unpack and substr to pull apart the buffered data (refilling the buffer as required). You may find Updated QuickTime format movie file dumper helps to understand the techniques involved - it does something similar to parse quicktime files.
|
|---|