in reply to Nested OR as a control structure
is interpreted as an anonymous hash constructor, and the semicolon in the middle of it is then a syntax error. Also, no-one seems to have mentioned 'do'; this allows you to use a block of code as an expression, eg... or { ....; ... }
But most of the time you're still better off using if/else..... or do { statement; statment; statement_with_final_value }
Dave.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Nested OR as a control structure
by simonm (Vicar) on Jun 03, 2004 at 17:27 UTC |