I am using Perl to generate a PDF file with the
PDF::API2 module.
I am having difficulty writing data to the file in the required format.
Currently this is how it appears in the PDF file.

Here's my script
my %data = (
'1' => {
'SEQUENCE' => '1',
'NAME' => 'John',
'ADDR1' => 'Road 1',
'GRADE' => '5'
},
'2' => {
'SEQUENCE' => '2',
'NAME' => 'Smith',
'ADDR1' => 'Road 2',
'GRADE' => '6'
}
);
...
...
my @rows = qw( NAME ADDR1 GRADE );
for my $id (sort keys %data){
push @tbl, [ @{$data{$id}}{@rows} ];
($name, $addr, $grade) = ($data{$id}{'NAME'}, $data{$id}{'ADDR1'}, $data{$id}{'GRADE'});
}
...
...
my $pdftable = new PDF::Table;
$pdftable->table(
$pdf,
$page,
\@tbl,
x => 50,
w => 400,
start_y => 630,
start_h => 630,
next_y => 630,
next_h => 630,
padding => 5,
border => 1,
padding_right => 10,
);
$pdf->saveas();
But I want it to to appear like this:

I know I have to make a modification to @tbl data, but how?