in reply to To display hash oh hash in tabular format using Text::Table

Here's one way:
use warnings; use strict; use Text::Table; my @titles = qw(NAME CLASS SUBJECT EXAM Marks AGGREGATE); my @dashes = map { '-' x length } @titles; my $dash_row = join ' ', @dashes; my $tb_ref = Text::Table->new(@titles); $tb_ref->load($dash_row); $tb_ref->load(['ABC', '1st year', qw(Maths Half-yearly 50)]); $tb_ref->load(['', '', '', qw(Full-yearly 49 49.5)]); $tb_ref->load([' ']); $tb_ref->load(['', '', qw(Science Quarterly 50)]); print "\n$tb_ref\n"; __END__ NAME CLASS SUBJECT EXAM Marks AGGREGATE ---- ----- ------- ---- ----- --------- ABC 1st year Maths Half-yearly 50 Full-yearly 49 49.5 Science Quarterly 50

Text::Table