in reply to Table data

To troubleshoot things like these, you need to see them.   Use an HTML dumper (possibly on the client side, e.g. FireBug) to see what the HTML data that is being sent actually consists of.   Then, when you are preparing the HTML output, use Data::Dumper (as previously noted) so that you can see what the data structure that you are trying to output actually contains.   Then, dump the HTML output so that you can see what you built.

It isn’t enough to simply observe that the browser’s page-output does not look as you expected it to.   There are just too many reasons why this should be, for you to “hazard a guess.”   That is a waste of time.