foreach my $key(keys %students_51){ #Direct interpolation to the add function of Text::Table $table_51->add( $key, "$students_51{$key}->{'age'}", "$students_51{$key}->{topic}", "$students_51{$key}->{class}" ); # a record of data } $table_51->add(' '); #ADD AN EMPTY Record print $table_51;