Help for this page
my %hash; @hash{val1, val2, val3} = undef; if (exists $hash{$test}) { }
my %hash = (val1 => \&task1, val2 => \&task2, val3 => \&task3); if (exists $hash{$test}) { $hash{$test}->(); }