Yes, in perldoc perlop it states that:
Binary "," is the comma operator. In scalar context it
evaluates its left argument, throws that value away, then
evaluates its right argument and returns that value. This
is just like C's comma operator.
So, when you do something like for($i=0,$j=0,...; ...) {...} the comma operator will cause the list of smaller 'expressions' (terminated by the first occurance of the ';' ) execute first.
As far as the second EXPR goes, it has to be a boolean expression. I nomrally use '||' and '&&' as they return value of the last expression evaluated. For example, '&&' would return value of expression to the right if one to the left is true. With regard to 'and'/'or' operands, they are similar with the exception that they bear lower precedence. Therefore, they are best used for control flow rather than in 'boolean' type operations.
|
"There is no system but GNU, and Linux is one of its kernels." -- Confession of Faith
|