in reply to How to read binary file with variable length in perl
- open the file with the :raw mode. See also: perlopentut. Put the file handle in binmode.
- read as many bytes as you need
- use unpack to extract the records you need. See also: perlpacktut
- If necessary, use read again to obtain variable length records.
- close the file
- ...
- PROFIT