123456789101112131415
#!/usr/bin/perl -wuse strict;my $name = chomp(<STDIN>);my %city_codes = qw(München => 66021, Gurke => 66024, XXX => 66087); if (exists $city_codes{$name}) { print "Zugewiesene Nummer fuer $name: $city_codes{$name}\n";} else { print "Wert in \$name '$name' unbekannt.\n";}