my %test = ( lookup => { 's' => 'sonne', ... } code => sub { my $input = shift; return $test{lookup}->{$input} || 'unknown' ; } }, );