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:
Rule of thumb: use || when you are actually using the result of the operation, otherwise use or.read(FH, $record, $RECSIZE) == $RECSIZE || die "can't read record $r +ecno: $!";
In Section
Seekers of Perl Wisdom