in reply to RFC: "Best Practices" code review section

A better practice is to put $filename (or similar) in some sort of delimiter in the die() call, like this:
open(my $fh, '<', $filename) or die "can't open '$filename': $!"
This gives you a handle on edge cases where e.g. $filename has trailing whitespace.