This is wrong:
return something() or die "something went wrong";
This is right:
return something || die "something went wrong";
(source)
The former will generate a warning:
Possible precedence issue with control flow operator
A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.