http://qs321.pair.com?node_id=469742


in reply to "or die" versus "|| die"

It's too easy to make precedence mistakes if you use the || variety for this kind of flow control. Witness later in that same faq: http://perldoc.perl.org/perlfaq5.html#How-do-I-randomly-update-a-binary-file%3f the error in the line:
read(FH, $record, $RECSIZE) == $RECSIZE || die "can't read record $r +ecno: $!";
Rule of thumb: use || when you are actually using the result of the operation, otherwise use or.