Hello, I just want to the number of the first column to minus the second column. The results are all 0. Thanks in advance!
open(IN1,"tmp01") || die "Cannot open this file"; @lines1 = <IN1>; open(OUT,">tmp02") || die "Cannot open this file"; for $item1(@lines1){ chomp $item1; @tmp1=split(/t+\,$item1/); $a=$tmp1[1]-$tmp1[0]; print OUT $a,"\n"; } close(IN1); close(OUT);
In reply to wrong in minus by yueli711
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |