in reply to using 'or' followed by ','
That comma is the sequence operator in scalar context. As in C, the left hand argument is evaluated, then the right, unconditionally. The comma expression returns the value of the right hand argument.
Precedence causes the expressions in that statement to bind like this: DO_SOMETHING or (warn("some warning"), next); If DO_SOMETHING evaluates false, the warning is issued and next is (uselessly, here) called.
The sequence operator is placed in scalar context by the logical or. In list context, the comma op evaluates and returns a list of both left and right values. That's familiar from providing arguments to subs and initializing arrays. The scalar comma can be thought of as similar to the '||' and '&&' logical ops, differing by the unconditional evaluation of the right hand argument.
After Compline,
Zaxo
|
|---|