The critical point regarding precedence has already been made. As for an example:
>perl -wMstrict -le "print 0 || 1; print 0 or 1; print(0 or 1); " 1 0 1
In reply to Re: difference between or and || operators
by AnomalousMonk
in thread difference between or and || operators
by sharanmath
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |