in reply to Complex conditional statements
You can't have more than one statement modifier (if, unless, for, foreach, while, until, .. am I missing any?) at a time. One reason you can't is that trying to figure it out in one's head is next to impossible, so trying to get a computer to do it in a way that users (perl programmers) expect would be a futile excersise.
Which is about the same reason why I think perl 6 still doesn't allow it.
Use more grouping constructs. In general, that would mean parenthesis, but in this case it means braces.
I'd offer an alternative, but I can't quite get my head around what you perceive the precedence of the unless and if are to each other.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Complex conditional statements
by bofh_of_oz (Hermit) on Jun 16, 2005 at 15:26 UTC | |
by mrpeabody (Friar) on Jun 16, 2005 at 17:17 UTC | |
by Tanktalus (Canon) on Jun 16, 2005 at 16:44 UTC |