Re: Split a text file

2002-12-13 Thread John W. Krahn
Marcelo wrote: > > Hi everybody ... Hello, > When I receive mail.. I can see it like a plain text file under > /var/spool/mail/marcelo where all the messages are concateneted one > after the other here is an example : > > From [EMAIL PROTECTED] Fri Dec 6 17:56:19 2002 > > [snip] > > A

RE: Split a text file

2002-12-13 Thread wiggins
This breaks down for many messages that have 2 "From"'s. Most messages start with a From not followed by a colon that is the envelope leader and include a From: (notice followed by a colon) that is in the message headers. I would suggest you not reinvent the wheel and check out the many modules

RE: Split a text file

2002-12-13 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Here is a start. I put to an array, but you could write to a file: #!perl -w my @MyMail = ();# hold email my $MyHoldMail = '';# use to build each email msg my $In = 0; # count of lines my $MyProc = 0; # ready to process or not while ( ) {