On Thu, Dec 19, 2002 at 11:57:20AM -0500, Benjamin M Wall wrote: > Im bothering with true because I think that it makes it more portable. The > "true" return value can vary on different operating systems and architectures
Well, razor-check returns 0 if the message is spam, that's the same on any platform. > You are right about the integer comparison, but it does work either way, I > tried it. For ints, sure ... it's part of perl's magic "what is this scalar today?" But you shouldn't get in the habit of using string compares when you really want numerical compares. Remember, "10 > 2" but "10 lt 2" ... ;) > And actually the other reason that I was _bothering_ with true is that > according to the perldoc on the system function ('perldoc perlfunc') in > order to get the actual return value from the system call you are supposed > to divide by 256. So this works with 0 but comparing to absolute values > is risky if you are assuming that a program returning '1' will give you a > '1' assignment from the system call... it will actually give you a value > of 256. Try it with and you will see what I mean... Yeah, I know that. But you only care if return value == 0, so don't worry about non-0. -- Randomly Generated Tagline: "I could build the best piece of software, and put it in the forest, and it wouldn't make a noise ..." - Instructor Heineman
msg00470/pgp00000.pgp
Description: PGP signature