use XML::Simple; use strict; my $config = XMLin('some.xhtml'); processhash($config,'$config'); sub processhash() { my ($href, $path, @junk) = @_; my %configr = %$href; foreach my $k (keys %configr) { print qq|$path :: $k = $configr{$k}\n|; if ($configr{$k} =~ m/HASH/i) //if it is another hash, iterate through that hash also { processhash($configr{$k},qq|$path -> {'$k'}|); } } }