in reply to Re: Looking for discussions of "block after or" syntax error
in thread Looking for discussions of "block after or" syntax error
print returns false on failure, in which case the 'and' would short-circuit and exit would never get called.
Granted, it's pretty unusual for print to fail -- so rare that we rarely test for success in our prints, and usually don't think in terms of "this could fail", but when you absolutely positively want to exit, don't include a logical test on print's success.
Dave
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Looking for discussions of "block after or" syntax error
by Laurent_R (Canon) on May 01, 2013 at 21:34 UTC | |
by davido (Cardinal) on May 01, 2013 at 21:48 UTC |
In Section
Seekers of Perl Wisdom