On Sat, Jun 29, 2002 at 10:35:33AM -0700, Bart Schaefer wrote: > > # $head is a Mail::Header object, fyi. > > my $SAstatus = $head->get("X-Spam-Status") || "No, tests=\n"; > > > > # Figure out if the message is considered spam or not > > $SAstatus =~ s/\n\t+\s+//g; # unfold long sections > > $SAstatus =~ s/\n\t+/ /g; # unfold everything else > > If you've already got a Mail::Header object, why not just use > $SAstatus->unfold()?
I could do $head->unfold('X-Spam-Status'), but not $SAstatus->unfold() ($SAstatus is a string, not an object. ;) ) I actually didn't know if unfold() would work or not, so I just did my own thing since it was short enough. The more "correct" thing to do would probably be to just do a generic $head->unfold() and unfold everything before parsing. :) I'll have to five that a shot when I get some time to work on the code some more. -- Randomly Generated Tagline: You tell it that it's indicative by appending $!. That's why we made $! such a short variable name, after all. :-) -- Larry Wall in <[EMAIL PROTECTED]> ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek No, I will not fix your computer. http://thinkgeek.com/sf _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk