I'm new to perl and don't have much idea in using modules. I'm trying to create a ouput.html file through perl. Basically perl gives me some rows of data for several experiment in my work. I'm using these results and making a table using HTML::table. To make it a kind of dashboard. Below is my code. Since i dont have access to server to create a webpage. I'm trying to create a html file which can be opened with a web browser.
use strict;
use warnings;
use feature "say";
use HTML::Table;
my $table1= new HTML::Table(-cols => 9,
-align => 'centre',
-rules => 'rows',
-border => "1",
-bgcolor => '#A6DBF7',
-width => '80%',
-spacing => 1,
-padding => 5,
-style => 'color:black',
-class => 'myclass',
-head => ['Block Name','Owner','Handoff','Covg-SA','SA-Patterns','Covg-TFT','TFT-Patterns','Fullscan-SA','Fullscan-TFT']);
open my $HTML,'>' ,'output.html' or die $!;
print $HTML "$table1\n";
for my $i (0..50) {
sub_call()
}
sub sub_call{
...bla..bla
..bla...bla...
.bla....
my @row=('$block','$uid','$step',,'$compress_SA_cvg','$temp','$compress_TFT_cvg','$logic_patt','$fullscan_SA_cvg','$fullscan_TFT_cvg');.
my $table1= new HTML::Table(-cols => 9,
-align => 'centre',
-rules => 'rows',
-border => "1",
-bgcolor => '#DAF7A6',
-width => '80%',
-spacing => 1,
-padding => 5,
-style => 'color:black',
-class => 'myclass',
);
$table1->addRow(@row);
open my $HTML,'>>' ,'output.html' or die $!;
print $HTML "$table1\n";
}
In the above code. I will be having a row of data in the array @row each time that 2nd block executes. which will be appended to the output.html . I have few requirements as below.
- each cell should have border
- for 3rd and 5th column, cell background should be depends on the their values.
- all the table should be neatly aligned center (values belonging to headlines should be below that headline).
I have attached screenshot of the output that i have got. For security reasons i left variables values as it is. But when i get variable's values this table will be not aligned properly.
Please suggest me what to use to meet above requirements.
Thanks in advance.

{and}, like asubor a loop). Can you please edit your question and show us the HTML of that header and the first row of data?