http://www.perlmonks.org?node_id=610395


in reply to dynamic website, putting data into right tablefield's

If your having trouble with the hashrefs or arrays, I'd take a look at perldsc for some good examples. As for the html I'd use a template (either HTML::Template or Template Toolkit. I'll leave an example of how to do it in TT, though I might be misreading what your arrays contain.

my $vars = { 'sup' => [ @sup ], 'products' => [ @products ], 'data' => { %data }, #data has the product names as keys ref. an array of data }; $tt->process('sometemplatefile', $vars); <table> [% foreach s = sup %] <tr><td>[% s %]</td></tr> [% end %] [% foreach p = products %] <tr><td>[% p %]</td> [% foreach cur = data.$p %] <td>[% cur %]</td> [% end %] </tr> [% end %] </table>