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

I just got a bunch of Windows files with a .msg file extenison that are listed as Outlook Item files. Does anyone know if there's a Perl module that reads these? I checked CPAN and tried Google and found nothing but maybe I'm looking for the wrong thing ...

Replies are listed 'Best First'.
Re: reading Outlook Item files
by The Mad Hatter (Priest) on Jun 19, 2003 at 18:53 UTC
    I don't know of anything, but might they be just plain text? I'd assume you've already checked, but if you haven't, I'd do so.

    Update A quick CPAN search turns up mbx2mbox and Mail::Transport::Dbx which sounds like they might help.

      I checked those out before posting. They appear to work on mailbox databases; these appear to be individual pieces from those.

      I mentioned this to a co-worker and he said "maybe what you need is just embedded as text" which was exactly right. Sometimes the obvious escapes me ... in this case I know all lines I want can't have spaces or control characters or non-ASCII values so this simple script is all I need:

      while (<>) { print $_ if ($_ =~ /^[^\00-\x20\x7f-\xff]+\r?$/); }