foreach my $file (@files) { my ($dir, $root, $ext) = $file =~ m|(.*)/(.*)\.(.*)|; #print $dir; my $outfile = "$dir/$root.html"; #print "Found: $dir/$root", '.', $ext, ". Write: $outfile","\n"; open my $fh_out, '>', $outfile or die "Can't open $outfile: $!","\n"; my $head = "
| SL.NO | CHECKLIST ITEM | VALUE | COMMENTS | CONFIRMATION | "; print $fh_out $head ; # write the header open my $fh, '<', $file or die "Can't open $file: $!"; while (my $line=<$fh>) { chomp $line; for($line) { s/(?:COMMENT|[&\\_@])//g; } my @data = split /:/, $line; my $class = $data[0] ? 'normal' : 'bold'; #print $fh_out qq[
|---|---|
| ] . join(' | ', split(/:/,$line)) . " |
| '; if($check==1) { print $fh_out ''; # print $fh_out ''; } print $fh_out $word; if($check==1) { print $fh_out ''; } print $fh_out ' | '; } print $fh_out "