in reply to stream parsing an mbox file
You can probably do something by setting $/ to an appropriate value - perhaps "\nFrom ";
Actually, I think I tried something like this once before. Problem is that it leaves "\nFrom " on the end of each mail and removes it from the start (except for the first one) so you have to munge them a bit. Something like this perhaps:
--my @mails; { local $/ = "\nFrom "; @mails = <>; chomp(@mails); $mails[$_] = "$/.$mails[$_]" foreach 1 .. $#mails; }
"Perl makes the fun jobs fun
and the boring jobs bearable" - me
|
|---|