#!/usr/bin/perl use strict; use warnings; use Data::Dumper; my %gang_with_no_adress = ( 'Pergamentmachergang' => 0 , 'Bedler-Gang' => 0 , 'Begidienhof' => 1 ); my %blackliste_gang_ohne_adress = ( 'Pergamentmachergang' => 1 , 'Adler-Gang' => 1 , 'Aegidienhof' => 1 ); for (sort keys %gang_with_no_adress){ if ($gang_with_no_adress{$_} == 0 && $blackliste_gang_ohne_adress{$_}){ $gang_with_no_adress{$_} = -1; } }#end-foreach print Dumper \%gang_with_no_adress;