#!/usr/bin/perl use strict; use warnings; use Data::Dumper; my $A = 'KEY'; my $href={ #HASH => { $A => 1} }; if (defined($href->{HASH}->{$A}) ){ print "definiert\n" }else{ print "nicht definiert\n" } print Dumper($href);