Rob Dixon wrote: > Mathew Snyder wrote: >> Mathew Snyder wrote: >>> I can't seem to get this working. Every time I try to run it >>> segfaults on me. >>> I've removed it from my code and reverted to the stage I was at >>> before I added >>> it and my script worked exactly as it did before I put it in. I've >>> installed it >>> via both cpan and yum. I've tried running it on a SuSE box and two >>> Fedora Core >>> 5 boxes. I get the same result both times. >>> >>> Does anyone know if this is a buggy module? Version is 1.883-1 >>> >>> Mathew >>> >> >> I looked over the doc for this module. It looks like the parse() method >> requires one argument which is a list of email addresses to look for. >> The way I >> have it set up I think I may be passing the source of an entire web >> page to it. > > OK it seems to dislike newlines in the content it's parsing. Make sure this > works for you and, if so, you can apply the same fix to your own data. > In the > meantime I shall make some time to find the problem in the module (it > just hangs > on my machine). > > Rob > > > use strict; > use warnings; > > use LWP::Simple; > use Email::Address; > > my $data = get > 'http://search.cpan.org/~rjbs/Email-Address-1.884/lib/Email/Address.pm'; > $data =~ s/\s+/ /g; > > my @addrs = Email::Address->parse($data); > > print $_->address, "\n" foreach @addrs; > >
Oh, and that little snippet of code did work for me. Mathew -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>