Breaking apart MBOX

Discussion in 'Perl' started by MJackson, Feb 19, 2004.

  1. MJackson

    MJackson Guest

    I'm new to perl. I need to read in the mailbox (mbox) and break it apart
    into seperate emails. Of course each email may be different lengths. Each
    email starts with From, but there are other lines in the email starting with
    From: (notice the colon). So, an email starts at From and ends at the
    character prior to the next From.

    I then need to store each email off into it's own file, numbered such as
    00001, 00002, etc. there will be very many of these.

    Any ideas.

    Any help greatly appreciated.
    Michael
     
    MJackson, Feb 19, 2004
    #1
    1. Advertising

  2. MJackson wrote:
    > I'm new to perl. I need to read in the mailbox (mbox) and break it
    > apart into seperate emails. Of course each email may be different
    > lengths. Each email starts with From, but there are other lines in
    > the email starting with From: (notice the colon). So, an email
    > starts at From and ends at the character prior to the next From.
    >
    > I then need to store each email off into it's own file, numbered
    > such as 00001, 00002, etc. there will be very many of these.


    Check out the read_mbox() function in the CPAN module Mail::Util.

    --
    Gunnar Hjalmarsson
    Email: http://www.gunnar.cc/cgi-bin/contact.pl
     
    Gunnar Hjalmarsson, Feb 19, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sky
    Replies:
    0
    Views:
    370
  2. Amy
    Replies:
    0
    Views:
    542
  3. Breaking strings apart

    , May 24, 2006, in forum: C Programming
    Replies:
    7
    Views:
    286
    CBFalconer
    May 25, 2006
  4. Replies:
    3
    Views:
    591
    John Nagle
    Aug 27, 2010
  5. Kyle Schmitt

    Breaking apart arrays for arguments?

    Kyle Schmitt, Sep 23, 2008, in forum: Ruby
    Replies:
    8
    Views:
    179
    Todd Benson
    Sep 24, 2008
Loading...

Share This Page