in reply to How to capture data length from the record ?

Open the file for reading and use read FILEHANDLE,SCALAR,LENGTH,OFFSET. Read the first four bytes to determine the length of the record, then read the record. Are the four bytes part of the record? You can use the read function to skip bytes as well, i.e. the trailing 40 bytes. How do you know it's the trailer and not another record? And last but not least: what have you tried so far? Could you show some code?

  • Comment on Re: How to capture data length from the record ?

Replies are listed 'Best First'.
Re^2: How to capture data length from the record ?
by bh_perl (Monk) on Feb 15, 2009 at 02:41 UTC
    Where i can refer any example for read FILEHANDLE,SCALAR,LENGTH,OFFSET ?.