#Convert to cvs open my $infile_1, "<", $output_1 or die $!; open my $outfile_1, ">", "clock.sum.rpt.csv" or die $!; #$header_1 = "Clock,Sinks,Buffers,Cells,Slew,Path,Vio,Area"; my $lines_1; while(<$infile_1>){ if(/(\w+|\S+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+.\d+)\s+(\d+.\d+)\s+(\ +d+)\s+(\d+.\d+)/g){ tr/ /,/s; print $outfile_1 "$_"; $lines_1 = $_; }else{ #$lines_1 = $_; #warn "WARN: This line does not follow the normal output pattern, +"; } } #print $outfile_1 $header_1; print $outfile_1 "$lines_1\n";