Next | Program Repair Shop | 292 |
Here's some code I wrote myself in an article about spam processing:
http://www.linuxplanet.com/linuxplanet/tutorials/1096/4/
The header of an email message is in $header:
Received: from renoir.op.net (root@206.84.208.4)
by plover.com with SMTP; 10 Apr 1997 05:08:31 -0000
Received: from major.globecomm.net (major.globecomm.net [207.51.48.5])
by renoir.op.net (8.7.1/8.7.1/$Revision: 1.10 $) with ESMTP id BAA02191
for <mjd@op.net>; Thu, 10 Apr 1997 01:06:35 -0400 (EDT)
From: LRS@getstartednow.com
To: friend@public.com
...
We want to split this up into lines and put them in a hash
But this doesn't work:
@lines = split /\n/, $header;
Because some of the logical lines are broken across two physical lines
Next | Copyright © 2002 M. J. Dominus |