in reply to Simple Switch statement
for ($val) { /^1$/ && do { do_something }; /^abc$/ && do { do_something_else }; /^\d{2,4}$/ && do { do_something_further }; }
This is straight out of the Camel.
------
We are the carpenters and bricklayers of the Information Age.
The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6
Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Simple Switch statement
by bradcathey (Prior) on Sep 13, 2003 at 01:28 UTC | |
by Roger (Parson) on Sep 13, 2003 at 01:55 UTC | |
by mwp (Hermit) on Sep 13, 2003 at 16:30 UTC | |
by Roger (Parson) on Sep 14, 2003 at 02:42 UTC |