From: "Hudson Clark" <[EMAIL PROTECTED]>
> So am I to understand that going downward from the top of the e-mail
> (lets say its in a @list) that the first line that is full of white
> space will be seperating the header from the message?
No. The first line thats EMPTY separates the header.
> I need to parse
> the message away from the header and get it by itself in a @list. I
> figure I can splice() at white space onward.
When spliting the headers keep in mind that this:
To: [EMAIL PROTECTED],
[EMAIL PROTECTED]
is ONE header, not two.
Assuming you are reading the message from IN I'd do something
like this:
...
while(<IN>) {
chomp;
last if /^$/;
if (/^\S/) {
push @headers, $_ ;
# new header if there's not a whitespace
} else {
$headers[-1] .= "\n" . $_;
# continuing the previous header
}
}
...
HTH, Jenda
=========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==========
There is a reason for living. There must be. I've seen it somewhere.
It's just that in the mess on my table ... and in my brain.
I can't find it.
--- me
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/listinfo/activeperl