in reply to Display Query Result in HTML Table
You can use HTML::TableTiler module also. For sample code look into Build Table with 'n' rows and 'm' columns
Regards,Velusamy R.