in reply to stream parsing an mbox file
To repeat the behaviour of your code I'd do:
It seems to me from previous experimentation that any lines in the body text starting with 'From ' will already be quoted with a > character, so that they will not cause the test I used to pass and will not therefore create a new array element.my @mails; while (<>) { if (/^From /) { $mails[$#mails + 1] = $_; } else { $mails[$#mails] .= $_; } }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: stream parsing an mbox file
by johnfoobar (Initiate) on Apr 12, 2001 at 15:25 UTC | |
by jink (Scribe) on Apr 12, 2001 at 15:41 UTC |
In Section
Seekers of Perl Wisdom