in reply to Help with better complex hash processing

Turning your loop into recursion might look like this:
#!/usr/bin/perl use strict; my $exception; $exception->{a}{b}{c}{d} = 4; walk_hash( $exception ); sub walk_hash { my $arg = shift; foreach my $key ( keys %{ $arg } ) { my $value = $arg->{ $key }; if ( ref( $value ) eq 'HASH' ) { walk_hash( $value ); } else { print "\t$key : $value\n"; } } }
So in the sub, check the type of the value. If it's a hash, walk it, otherwise print the key:value. You can pass other things to the recursion if you need them, like the depth so you can alter indentation.

Phil