in reply to Re: Perl6 syntax being too much complex? How we will teach and read that?!
in thread Perl6 syntax being too much complex? How we will teach and read that?!
if $foo eq 'bar' or $foo eq 'baz' or $foo eq 'quux' { ... }
Or, the non-hardcoded version ...
my %isAcceptable = map { $_ => 1 } qw( bar baz quux ); if $isAcceptable{$foo} { ... }
------
We are the carpenters and bricklayers of the Information Age.
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: Re: Perl6 syntax being too much complex? How we will teach and read that?!
by Juerd (Abbot) on Mar 22, 2004 at 17:27 UTC | |
by TimToady (Parson) on Mar 22, 2004 at 18:00 UTC | |
by Juerd (Abbot) on Mar 22, 2004 at 19:33 UTC | |
by TimToady (Parson) on Mar 22, 2004 at 20:27 UTC | |
by Juerd (Abbot) on Mar 22, 2004 at 22:03 UTC | |
|