Re: Simple problem with Email::Address         


Author: Jim Gibson
Date: May 16, 2008 12:09

In article library.airnews.net>,
Bernie Cosell fantasyfarm.com> wrote:
> I'm trying to parse an email address and I can't seem to get Email::Address
> to work quite.

You are not calling parse() correctly.
>
> #!/usr/bin/perl
>
> use strict;
> use warnings ;
> use Email::Address ;
>
> my $addr = "My Name verizon.net>\n" ;
> my @addrs = Email::Address::parse($addr) ;

my @addrs = Email::Address->parse($addr);
> warn scalar(@addrs) ;
>
> Gets me "0" -- it appears not to parse that string, which certainly looks
> like a legal email addr to me [am I missing some problem with it?? -- I
> actually pulled it out of a file of addresses that sendmail is happily
> sending-via]. What am I missing here? THANKS!

perldoc Email::Address

--
Jim Gibson

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
http://www.usenet.com
diggit! del.icio.us! reddit!