On Thursday 07 March 2002 09:00 am, Matt Sergeant wrote: > > # 3) Some whitespace > > my $num_lines = scalar grep(/\s/, grep(/^[A-Z]{20,}$/, @lines));
"\s" needs to be added to the stripping regexp and the extraction regexp, or $num_lines will always be 0. That should be: Index: lib/Mail/SpamAssassin/EvalTests.pm =================================================================== RCS file: /cvsroot/spamassassin/spamassassin/lib/Mail/SpamAssassin/EvalTests.pm,v retrieving revision 1.109 diff -u -3 -p -r1.109 EvalTests.pm --- lib/Mail/SpamAssassin/EvalTests.pm 4 Mar 2002 17:43:49 -0000 1.109 +++ lib/Mail/SpamAssassin/EvalTests.pm 7 Mar 2002 23:36:07 -0000 @@ -889,12 +1003,12 @@ sub check_for_yelling { my @lines = @{$body}; # Get rid of everything but upper AND lower case letters - map (s/[^A-Za-z]//sg, @lines); + map (s/[^A-Za-z\s]//sg, @lines); # Now that we have a mixture of upper and lower case, see if it's # 1) All upper case # 2) 20 or more characters in length - my $num_lines = scalar grep(/^[A-Z]{20,}$/, @lines); + my $num_lines = scalar grep(/\s/, grep(/^[A-Z\s]{20,}$/, @lines) ); $self->{num_yelling_lines} = $num_lines; -- Visit http://dmoz.org, the world's | Give a man a match, and he'll be warm largest human edited web directory. | for a minute, but set him on fire, and | he'll be warm for the rest of his life. [EMAIL PROTECTED] ICQ: 132152059 | _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk