[quote=pq,22.05.2007, 20:36]hmm, aber das kann keine email-adressen *finden*, so wie
Email::Find, oder?[/quote]
Korrekt.
Mail::RFC822::Address stellt selber keine Möglichkeit zur
Verfügung, um Emails in einem Text zu finden. Das geht nur, wenn man
selber sucht.
my $rfc822re = &Mail::RFC822::Address::make_rfc822re;
while (my $line = <DATA>) {
print "Valid mail: ".$_."\n"
for $line =~ /($rfc822re)/g;
}
Hinzu kommt, dass man - wie Nepos schon schrieb - nur validieren kann.
Mail::RFC822::Address kann nicht formatieren wie zum Beispiel
<foo @ test.example> nach
foo@text.example.
So gesehen wäre Email::Find dann die bessere Alternative.\n\n
<!--EDIT|opi|1179909758-->
What is a good module? That's hard to say.
What is good code? That's also hard to say.
One man's Thing of Beauty is another's man's Evil Hack.