in reply to Mail::Field Help Needed
After installing Mail::Field::Received using ppm and using the examples in the synopsis I got the following.
outputs#!/usr/local/bin/perl use strict; use warnings; use Mail::Field; my $header = q{from tr909.mediaconsult.com (mediacons.tecc.co.uk [193. +128.6.132]) by host5.hostingcheck.com (8.9.3/8.9.3) with ESMTP id VAA +24164 for <adam@spiers.net>; Tue, 1 Feb 2000 21:57:18 -0500}; print qq{header: $header\n}; my $received = Mail::Field->new(q{Received}, $header); my $results = $received->parse_tree(); # hangs perl #if ($received->parse_ok){ # print qq{parse ok\n}; #} #else{ # print qq{parse not ok\n}; #} print qq{by -> domain: $results->{by}{domain}\n};
On my setup the $received->parse_ok method hung perl (see update) but the $received->parse_tree worked. I haven't had a chance to look at the source to identify why.header: from tr909.mediaconsult.com (mediacons.tecc.co.uk [193.128.6.1 +32]) by host5.hostingcheck.com (8.9.3/8.9.3) with ESMTP id VAA24164 f +or <adam@spiers.net>; Tue, 1 Feb 2000 21:57:18 -0500 by -> domain: host5.hostingcheck.com
update: see broomduster's reply pointing out my typo that caused the error.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Mail::Field Help Needed
by broomduster (Priest) on Sep 01, 2008 at 13:12 UTC | |
by wfsp (Abbot) on Sep 01, 2008 at 13:20 UTC | |
|
Re^2: Mail::Field Help Needed
by gw1500se (Beadle) on Sep 01, 2008 at 19:45 UTC |