perlfaq9: How do I read mail?

[email protected] (_brian_d_foy)
Newsgroups perl.perlfaq.workers,perl.documentation
Message-ID <260120031246335816%[email protected]>
* added a trailing space to the regular expression that matches
From at the beginnging of a line (which might match things like
"Fromage").

Index: perlfaq9.pod
===================================================================
RCS file: /cvs/public/perlfaq/perlfaq9.pod,v
retrieving revision 1.14
diff -u -d -r1.14 perlfaq9.pod
--- perlfaq9.pod        6 Dec 2002 07:40:11 -0000       1.14
+++ perlfaq9.pod        26 Jan 2003 18:44:44 -0000
@@ -557,17 +557,17 @@
 =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) || '';
         }

-- 
brian d foy, [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.