Hi Troy,

No, the 'or' operator is better.  A rule of thumb is that you should use 
'or' when you mean to control process flow, and '||' when you mean to 
perform boolean arithmetic.  That usually seems to make things read 
best, but of course there are exceptions.

The reason I wouldn't use '||' in this case is that I'd have to think 
hard about whether it would mean
    (system(...) == 0) || die "...";
or
    system(...) == (0 || die "...");

, but with 'or' it's obvious.


  -Ken

On Tuesday, March 26, 2002, at 09:26 AM, Troy Davis wrote:
> Isn't the || operator appropriate in a case like this?  (instead of 
> 'or')
>
> Ken wrote:
>> system ("/Users/username/perl_dir/perl_script --flags 
>> other_arguments") == 0
>>   or die "script failed: $?";

Reply via email to