Is it possible to have multiple commands preceeding an unless test?
Use do:
do {print "Program Error!"; exit(0)} unless [case is true];
Although, personally, I would find the prefix variant of unless clearer if you're doing more than one thing.
While I'm at it, I have a short script that replaces a specific line in a file. Is there a better way to do this than what I'll pseudo code below?
Take a look at Tie::File - dead useful :-)
In reply to Re: unless
by adrianh
in thread multiple commands before unless ?
by emilford
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |