in reply to multiple commands before unless ?
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 :-)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: unless
by emilford (Friar) on Jun 25, 2003 at 18:24 UTC |