I have the script that prints out a tab delimited file. However, when I open it in Unix it puts these ^M symbols after 2 of the columns. When I open it in windows in notepad they appear as rectangle boxes instead, and in Excel it interprets it as go to a new line, so my columns get all out of alignment.
Here is an example of the output I get as viewed from Unix:
1.37657^M 0 16.37657^M 16.37657
3.92090^M 0 19.26123^M 19.26123
10.37657^M 1 22.21257^M 22.21257
50.37657^M 1 214.23345^M 214.23345
159.56789^M 0 238.11100^M 238.11100
500.26123^M 0 287.04997^M 287.04997
6056.12612^M 1 301.06797^M 301.06797
Here is the portion of code that prints the information to the file:
open(OUT, "> $out_file"
;
for my $i(0..$#Array32){
print OUT "\n$Array1920[$i]\t$Array1314[$i]\t$Array32[$i]";
}
close(OUT);
Any ideas what the problem is? What baffles me is that it happens on some columns and not others. Also that first column when I used to print it as the last column it didn't have the M^'s but when I moved it to first position then it started doing the M^'s. It doesn't make any sense to me.
-Lauren
Here is an example of the output I get as viewed from Unix:
1.37657^M 0 16.37657^M 16.37657
3.92090^M 0 19.26123^M 19.26123
10.37657^M 1 22.21257^M 22.21257
50.37657^M 1 214.23345^M 214.23345
159.56789^M 0 238.11100^M 238.11100
500.26123^M 0 287.04997^M 287.04997
6056.12612^M 1 301.06797^M 301.06797
Here is the portion of code that prints the information to the file:
open(OUT, "> $out_file"
for my $i(0..$#Array32){
print OUT "\n$Array1920[$i]\t$Array1314[$i]\t$Array32[$i]";
}
close(OUT);
Any ideas what the problem is? What baffles me is that it happens on some columns and not others. Also that first column when I used to print it as the last column it didn't have the M^'s but when I moved it to first position then it started doing the M^'s. It doesn't make any sense to me.
-Lauren