X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlfaq9.pod;h=fa59003d109c44994b664c4e3c8368556a0bef89;hb=10ac92784f49d4a1fe54cc1ed7d05f0d3b2a2f29;hp=ec0a4f5b741d6aace2b862f1b1a575dcdd05d041;hpb=197aec242db45fbf1d7853a1ae22a108cc09d23c;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlfaq9.pod b/pod/perlfaq9.pod index ec0a4f5..fa59003 100644 --- a/pod/perlfaq9.pod +++ b/pod/perlfaq9.pod @@ -1,6 +1,6 @@ =head1 NAME -perlfaq9 - Networking ($Revision: 1.14 $, $Date: 2002/12/06 07:40:11 $) +perlfaq9 - Networking ($Revision: 1.16 $, $Date: 2004/10/30 12:20:59 $) =head1 DESCRIPTION @@ -383,7 +383,7 @@ a database, send mail, or purchase a computer). You can't, at least, not in real time. Bummer, eh? Without sending mail to the address and seeing whether there's a human -on the other hand to answer you, you cannot determine whether a mail +on the other end to answer you, you cannot determine whether a mail address is valid. Even if you apply the mail header standard, you can have problems, because there are deliverable addresses that aren't RFC-822 (the mail header standard) compliant, and addresses that aren't @@ -557,17 +557,17 @@ SMTP via L. =head2 How do I read mail? While you could use the Mail::Folder module from CPAN (part of the -MailFolder package) or the Mail::Internet module from CPAN (also part +MailFolder package) or the Mail::Internet module from CPAN (part of the MailTools package), often a module is overkill. Here's a mail sorter. #!/usr/bin/perl - # bysub1 - simple sort by subject + my(@msgs, @sub); my $msgno = -1; $/ = ''; # paragraph reads while (<>) { - if (/^From/m) { + if (/^From /m) { /^Subject:\s*(?:Re:\s*)*(.*)/mi; $sub[++$msgno] = lc($1) || ''; }