in reply to
Looking for discussions of "block after or" syntax error
A possibly more perlish way:
my $in = "somefile.txt";
open my $FH, "<", $in or print "cannot open file $in\n" and exit 3;
EDIT: I had not paid attention to your title when I wrote the above, I now see that your question is really related to the block construct after the or keyword. My answer above may thus be slightly off-topic. It still gives a workable solution to the immediate problem and probably a better syntax to open a file.