On Thu, Dec 19, 2002 at 10:34:10AM -0500, Benjamin M Wall wrote:
> >  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}
> 
> the line that reads > if ($razor_res == $standard)
> should be .... if ($razor_res eq $standard)

Uhhhh.  No, you're comparing integer values.  '==' is numerical, 'eq'
is string.  And while we're on it:

- just tell razor-check where the file is:

my $razor_res = system("razor-check /tmp/razor$randnum");

that's one less process to get in your way.

- why bother running "true"?

if ( $razor_res == 0 ) { # could be 'unless ($razor_res)' too...
        SPAM
}

-- 
Randomly Generated Tagline:
"How should I know if it works?  That's what beta testers are for.  I only
 coded it."
 (Attributed to Linus Torvalds, somewhere in a posting)

Attachment: msg00466/pgp00000.pgp
Description: PGP signature

Reply via email to