wsanders has asked for the wisdom of the Perl Monks concerning the following question:
Every once in a while I mistype someting like:
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 beingopen(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, --wif (! open(F, "<$somefile")) { print "Could not open file\n"; exit 3; }
Back to
Seekers of Perl Wisdom