What is the difference between “||” and “or” in Perl?

前端 未结 4 1188
旧巷少年郎
旧巷少年郎 2020-12-13 12:25

What is the difference between the C-style operators &&, ||, ... and their Perl human-readable version \"and\", \"or

4条回答
  •  Happy的楠姐
    2020-12-13 13:24

    !, &&, ||, and ^ have high precedence such that they are useful in constructing an expression; not, and, or, and xor have low precedence such that they are useful for flow control between what are essentially different expressions.

提交回复
热议问题