# Just walk the created structure, and output # the name whenever we hit a leaf : sub walk { my ($hashref, $path) = @_; #print $path,"\n"; my @keys = keys %$hashref; if (@keys) { walk( $hashref->{$_}, $path . "/$_" ) foreach (@keys); } else { print "$path\n"; }; }; walk( \%thingy, "" );