$siebdb = 'somekey'; $preprod->{$siebdb} = "DISK:\\db2_backup\\"; $prod->{$siebdb} = "USEREXIT"; if($preprod->{$siebdb} ne $prod->{$siebdb}) { print "NOT EQUAL"; } else { print "EQUAL"; } #### NOT EQUAL