On Wed, Mar 08, 2006 at 06:15:38PM +0530, Ramprasad wrote:
> If I run my script I get score=0 
> What is wrong with the script
> -------------------------------------------------------
> #!/usr/bin/perl
> use Mail::SpamAssassin;
> use Data::Dumper;
> use strict;
> my $rundir = "$ENV{HOME}/perl/sa";
> my $m;
> while(<>){  $m=$_; }

Your first problem is that you likely want "$m.=$_;", or else your "message" is
going to be the last line of the input.  I'd probably use an array instead
since otherwise the Message parser is just going to split the scalar up, and
you'll go array->scalar->array, which doesn't make much sense. ;)

$/=undef;
my @m = <>;

then pass in the array: $status->parse([EMAIL PROTECTED], 1).

See if that helps. :)

-- 
Randomly Generated Tagline:
There's no heavier burden than a great potential.

Attachment: pgpp4aEJxSZ0C.pgp
Description: PGP signature

Reply via email to