in reply to returning nested data structures

Well, not all of your code is here, so its hard to tell, but if you mean to return the hash as a reference you need a return \%filters;, if not you need to do %hash = Module::method(); since you will be returning as a list. But more importantly, are you sure there is any data in the hash at the end? Use some print statements or even better change return %filters to:
use Data::Dumper; print STDERR Dumper(\%filters); return %filters;
To make sure you actually have data!

                - Ant
                - Some of my best work - (1 2 3)