in reply to dbi::anydata

If you convert to a standard format, you can load your data into mySQL and query it from there:
http://dev.mysql.com/doc/mysql/en/load-data.html

Something like the following may work for convertion:

my (@keys, $out); @keys = sort keys %$D; print join "\t", @keys; print "\n"; $out = ''; $out .= $D->{$_} . "\t" for @keys; chop $out; print $out, "\n";
Where the first line is the field names, so you know what order to load everything in, and \t is the delimiter. If there's a chance there may be tabs in the data, you'll want to use a different delimiter, same goes for \n for end of record.

If (as is probably the case) you have a number of these records to go through, you'll want to cycle through them once to get a full list of all possible fields, then cycle through again to output the data in the proper order.