Help for this page

Select Code to Download


  1. or download this
    my %hash;
    @hash{val1, val2, val3} = undef;
    
    if (exists $hash{$test}) {
    }
    
  2. or download this
    my %hash = (val1 => \&task1, val2 => \&task2, val3 => \&task3);
    
    if (exists $hash{$test}) {
        $hash{$test}->();
    }