in reply to Re^2: How to add a new column into my csv file?
in thread How to add a new column into my csv file?
pojwhile (my $line1 = <$file2>){ chomp $line1; # Item,Sink,Buffer,Cell,Slew,Path,Violation,Area my @f = split /,/, $line1 ; my $item = $f[0]; my $slew = $f[4]; next if $item eq 'Item'; # skip header if (defined $file1Hash{$item}) { my $period = $file1Hash{$item}; my $pc = sprintf "%.10f",100*$slew/$period unless ($period==0); print $outfile_1 join ',',$line1,$period,$pc."\n"; } }
|
|---|