in reply to Creating table through PERL
Since you want to generate a table in HTML, perhaps you could use the Module HTML::Table which you can download from CPAN. There is an example of how to use the module on CPAN