http://www.perlmonks.org?node_id=779963

perl5ever has asked for the wisdom of the Perl Monks concerning the following question:

Hi fellow Monks!

I am storing email messages I get from an IMAP server into files, and because of their small size and to save on disk space I want to store multiple messages (like 100's) in a single file.

I'm looking for a good storage format to use, i.e. one that allows for efficient and reliable parsing. The messages will not be used with a mail reader, so there is no need to use any 'mailbox' formats.

The storage format only needs to be efficient for sequential traversal, and, of course, it would be nice if there was a perl module which already implemented the format. Having it be a 'plain text' format (so one can use command line tools like 'grep') would be a bonus, too.

Any suggestions?