> 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
> }

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

You are right about the integer comparison, but it does work either way, I 
tried it.

As for the arguments to razor... good call less processes are better.

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...
$returnval = system("false");
print "Return Value = $returnval";

Anyway..
Ben Wall


-------------------------------------------------------
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

Reply via email to