in reply to How to organize file records

Are you committed to using binary data?
Something I've found works quite well is to have one record per line, and to separate fields within the record with a separator of some kind (I usually use '#').
Then it's easy to use <> to pull in records one at at time, and split to extract the fields.
The obvious caveats are that this won't work properly with non-text data, that individual fields can't span multiple lines, and that no field may contain the separator (but escaping deals with those last two points). It works well for web data though.

Replies are listed 'Best First'.
The file record definition is already given
by Anonymous Monk on Mar 14, 2000 at 20:57 UTC
    Well, the problem is that the files are not really database files but files with an already given definition (for example, .ZIP archives, .MP3 files or in this special case, MacBinary files). I have good, working Pascal code that reads the information from these files, but I'd like to port that work to Perl to become more portable.

    Perl would have the easy extensibility of a scripting language, but it has the problem of reading and parsing the record in the first place ...