As you've probably seen from the Data::Dumper docs, several output formats are offered, one of which may suit your needs.
In any event, the Dumper output follows regular rules, so you can write regexes to convert it to whatever format was useful. Arguably it's quicker to let Data::Dumper turn it into a regular format and then regex, than try to iterate through and do the conversion yourself.
When I have done this, I've always been glad when I remembered the
/s regex modifier ;)
§
George Sherston