foreach my $key (sort keys %$hash_ref) { print substr($key . '.' x 30,0,30) . ' => '; if ($key eq 'bic_candidates') { if(defined($hash_ref->{$key})) { my $typ=ref($hash_ref->{$key}); print "Element hat den typ: $typ\n"; print "(Untermenge wie folgt:)\n"; if($typ eq "ARRAY") { # Die im Array enthaltenen Hashes auslesen. for my $i (0..$#{$hash_ref->{$key}}) { print " Element $i:\n"; for my $inkey (sort keys %{$hash_ref->{$key}->[$i]}) { my $val = $hash_ref->{$key}->[$i]->{$inkey}; print " $inkey -> $val\n"; } } # was kommt nun raus? } else { print Dumper($hash_ref->{$key}); } } else { print "NOT DEFINED"; } } else { print (defined $hash_ref -> {$key} ? (length $hash_ref -> {$key} > 65 ? substr($hash_ref -> {$key},0,60) . '...' : $hash_ref -> {$key}) : 'NOT DEFINED'); } print "\n"; }