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.

Reply via email to