Odd number of elements in hash assignment at E:/Perl/site/lib/PDF/Table.pm line 230. #### use PDF::API2; use PDF::Table; use HTML::Parser; use HTML::TableExtract; $final_content = '
CustomerTotal SamplesSL ViolationsAvg Availability
All Customers183867210298.85

Customers Below 90% Available

CustomerTotal SamplesSL ViolationsAvailability
CD date 225691359.53 %
QK - data2896178.89 %
MW - verw1873481.81 %
FY - werds2283086.84 %
1dsfew - text106412488.34 %
1Zdfe - down4354888.96 %
1vds - Corp5636189.16 %
8Zer - Szerw2882989.93 %
'; #### this i get from earlier part of program $te = HTML::TableExtract->new( headers => ["Customer","Total Samples","SL Violations","Availability"]); $te->parse($final_content); #this is the content i pass my $page=0; my $tabs=0; foreach $ts ($te->tables) { print "Table (", join(',', $ts->coords), "):\n"; $page++; foreach $row ($ts->rows) { $t=join(",",@$row); my @row_ele = split(/,/,$t); push(@arr,[@row_ele]); #potential problem line, need to push the rows into an array, i think it returns a reference print "@row_ele"."\n"; } } my $pdftable = new PDF::Table; my $pdf = new PDF::API2(-file => "New.pdf"); # $some_data=[[1,2,3],[2,3,4]];########data needed in this format to print in pdf table for($k=0;$k<$page;$k++) { print "page is now $k\n"; my $page = $pdf->page(1); $pdftable->table( # required params $pdf, $page, @{$arr[$k]}, #############Problem line, not proper, some mistake -x => 10, -start_y => 500, -next_y => 700, -start_h => 300, -next_h => 500, # some optional params -w => 570, -padding => 5, -padding_right => 10, -background_color_odd => "white", -background_color_even => "yellow", #cell background color for even rows ); } $pdf->save;