http://www.perlmonks.org?node_id=1031626

wsanders has asked for the wisdom of the Perl Monks concerning the following question:

Every once in a while I mistype someting like:
open(F, "<$somefile") || { print "Could not open file\n"; exit 3; }
which results in a syntax error. I've always wondered why this isn't allowed to work. Does anyone have a link to a discussion of why this is? Or a quick dissertation on the topic that can be cut and pasted in? Of course there are lots of ways to work around this, no need to explain, the most obvious being
if (! open(F, "<$somefile")) { print "Could not open file\n"; exit 3; }
Being a Perl true believer I disdain a C-ish expression when someing more Perlish is possible ... Thanks, --w