in reply to Re^4: No braces
in thread No braces
See below. I have done something like this before and didn't like it much, but it got the job done. Really though, it's not any cleaner than the if-comb due to the extra semantic gorp.
foo: { if (/^abc/) { $abc = 1; last foo; } if (/^def/) { $def = 1; last foo; } if (/^xyz/) { $xyz = 1; last foo; } $nothing = 1; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: No braces
by hardburn (Abbot) on Feb 11, 2004 at 15:26 UTC | |
by TimToady (Parson) on Feb 12, 2004 at 17:12 UTC | |
by Abigail-II (Bishop) on Feb 11, 2004 at 15:57 UTC | |
by hardburn (Abbot) on Feb 11, 2004 at 16:26 UTC | |
by Abigail-II (Bishop) on Feb 11, 2004 at 16:36 UTC | |
by hardburn (Abbot) on Feb 11, 2004 at 17:18 UTC | |
| |
by metadoktor (Hermit) on Feb 11, 2004 at 18:58 UTC | |
by flyingmoose (Priest) on Feb 11, 2004 at 19:20 UTC |