On 4 Aug 2000 14:59:06 -0000, Perl6 RFC Librarian wrote: > %special = ( woohoo => 1, d'oh => 1 ); > > while (<>) { > switch ($_) { > > case (%special) { print "homer\n"; last } # if >$special{$_} Hold it. Is that if($special{$_}) { ... or if(defined $special{$_}) { ... or if (exists special{$_}) { ... >From a purist point of view, [3] makes the most sense. [1] may be more practical, in a lot of cases. [2] is somewhere in between the two, where a user could provide exceptional cases, for which this is supposed to fail. Er... something like that. -- Bart.
- Re: RFC 22 (v1) Builtin switch statement Ken Fox
- Re: RFC 22 (v1) Builtin switch statement Glenn Linderman
- Re: RFC 22 (v1) Builtin switch statem... Jeremy Howard
- Re: RFC 22 (v1) Builtin switch statem... Ken Fox
- Re: RFC 22 (v1) Builtin switch statem... Damian Conway
- Re: RFC 22 (v1) Builtin switch s... Jarkko Hietaniemi
- Re: RFC 22 (v1) Builtin swit... Chaim Frenkel
- Re: RFC 22 (v1) Builtin switch s... Chaim Frenkel
- Re: RFC 22 (v1) Builtin switch statement Damian Conway
- ConwayPerl (was Re: RFC 22 (v1) Builtin switc... Jeremy Howard
- RE: RFC 22 (v1) Builtin switch statement Bart Lateur
- RE: RFC 22 (v1) Builtin switch statement Lipscomb, Al
- RE: RFC 22 (v1) Builtin switch statement Damian Conway
- Re: RFC 22 (v1) Builtin switch statement Jonathan Scott Duff
- Re: RFC 22 (v1) Builtin switch statement Glenn Linderman
- Re: RFC 22 (v1) Builtin switch statement Damian Conway
- RE: RFC 22 (v1) Builtin switch statement Lipscomb, Al