in reply to multiple commands before unless ?
You have a precedence issue.
I recently happened upon an brilliant online tutorial on this subject, but I can't find the URL for the mo (the issue is nevertheless well addressed in chapter 2 of Simon Cozens' Beginning Perl available online at http://learn.perl.org/library/beginning_perl/3145_Chap02.pdf).
The precedence issue was indeed (very succinctly) pointed out in fglock's reply above.
Removing punctuation, and simplifying, your key line is: print "Program Error!" && exit(0) unless $case; Just change the && to and, and it'll work:
hth davemy $case = 1; print 'Program Error' and exit(0) unless $case; print 'No problemo!'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: multiple commands before unless ?
by jsprat (Curate) on Jun 26, 2003 at 16:59 UTC | |
by Not_a_Number (Prior) on Jun 26, 2003 at 21:36 UTC | |
|
Re: Re: multiple commands before unless ?
by emilford (Friar) on Jun 26, 2003 at 16:17 UTC |