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
Bernie Cosell  
View profile
 More options May 16, 1:37 pm
Newsgroups: comp.lang.perl.misc, comp.lang.perl.modules
From: Bernie Cosell <ber...@fantasyfarm.com>
Date: Fri, 16 May 2008 13:37:08 -0400
Local: Fri, May 16 2008 1:37 pm
Subject: Simple problem with Email::Address
I'm trying to parse an email address and I can't seem to get Email::Address
to work quite.

#!/usr/bin/perl

use strict;
use warnings ;
use Email::Address ;

my $addr = "My Name              <myname\@verizon.net>\n" ;
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!

  /bernie\
--
Bernie Cosell                     Fantasy Farm Fibers
ber...@fantasyfarm.com            Pearisburg, VA
    -->  Too many people, too few sheep  <--          


    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