On Thursday 19 December 2002 08:55 am, Jon Oringer wrote: > Can anybody see anything wrong with this? > > I'm using Postfix.. /etc/aliases says: > > support: "|/usr/bin/perl /home/mailman/sql_the_mail.pl" > > Here is the sql_the_main.pl code > > while(<STDIN>) { $bod .= $_; } > > my $mb = Mail::MboxParser->new(\$bod); > for my $msg ($mb->get_messages) { > ... > open(G,">/tmp/razor$randnum"); > print G $bod; > close G; > my $razor_res = `cat /tmp/razor$randnum | razor-check`; > ... > } > $razor_res never contains any data
What you are getting is the return value from razor-check. Where are you checking to see if it has any data? It is a locally scoped variable, so if you check it outside of that loop it will not contain any data. You should be getting some return value from razor-check but this will not play nicely with others. If you want the return value from razor-check then use the system("") call. The backticks is more for getting the output of a command. my $razor_res = system("cat /tmp/razor$randnum | razor-check"); my $standard = system("true"); if ($razor_res == $standard) SPAM else { NOT-YET-CATALOGUED-AS-SPAM} ------------------------------------------------------- This SF.NET email is sponsored by: Geek Gift Procrastinating? Get the perfect geek gift now! Before the Holidays pass you by. T H I N K G E E K . C O M http://www.thinkgeek.com/sf/ _______________________________________________ Razor-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/razor-users