in reply to Using || operator with arrays
Same as it works for anything else. perlop probably describes this well. "||" and "or" both evalute to the left-hand-side (LHS) if it is true, otherwise it evaluates to the right-hand-side (RHS).
Since an empty array is considered "false", the or operator evaluates the RHS and returns its value.
|
|---|