in reply to or before ||, for || comes before or
in thread beginner syntax question
There is more than one way to deal with operator precedence. One way is to substitute the or operator as you suggested. But a perfectly acceptable alternative is to use parentheses to make the precedence explicit. That's what was done is this case. It may make you nervous, but it's still perfectly acceptable (and in fact easier for novices to understand).open(FILE, "filename") || die "Can't open filename: $!";
buckaduck
|
|---|