in reply to passing array value to hash not happening

After running your code through my spaghetti strainer, the only thing i can think of is that you are forgetting to dereference $headers - and since you probably are not using strict, the typo is easily overlooked. Try this instead:
foreach $header (@$headers) { ... }
Hope that does it for you. :)

Oh yeah! <plug> Take a look at DBIx::XHTML_Table </plug> ;)

It might be as simple as:

use strict; use DBIx::XHTML_Table; my $table = DBIx::XHTML_Table->new("insert db credentials"); $table->exec_query(" select data_name, sum(data_value) from dwhs.store_reports where report_type = ? and timestamp >= sysdate - ? group by data_name ",[$list_name,$day_list]); $table->modify_tag(table => { border => 3, cellspacing => '0', cellpadding => '0', width => '100%', }); $table->modify_tag(td => { bgcolor => '#CCCCCC', align => 'center', }); print $table->get_table();
But this depends on what is happening in your first query that creates the table header. My module merely uses the column names as the header (i _think_ that that's what you are doing) . . . maybe i should allow a hook to replace the headers . . . but i digest. :)

jeffa

    A flute with no holes is not a flute . . .
a doughnut with no holes is a danish.
                                - Basho,
                                  famous philosopher