Google Groups Home
Help | Sign in
Message from discussion Simple problem with Email::Address
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Jim Gibson  
View profile
 More options May 16, 3:09 pm
Newsgroups: comp.lang.perl.misc, comp.lang.perl.modules
From: Jim Gibson <jimsgib...@gmail.com>
Date: Fri, 16 May 2008 12:09:25 -0700
Local: Fri, May 16 2008 3:09 pm
Subject: Re: Simple problem with Email::Address
In article <aahr24dpblvs36fuh7ja9gvdhavod3k...@library.airnews.net>,

Bernie Cosell <ber...@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              <myname\@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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google