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 = " DCMS_CHECKLIST "; 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[\n"; print $fh_out qq[]; # my %data; my $check=0; for my $word(@data){ $check++; print $fh_out ''; } print $fh_out "\n"; } }
SL.NOCHECKLIST ITEMVALUECOMMENTSCONFIRMATION
] . 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 '