in reply to CRLF and Windows XP SP2

On windows, you should get crlf endings by default:
open FH, ">tmp.txt" or die "Acck: $!"; # binmode FH; print FH "This has a cr-lf\n"; close FH;
line-feeds get translated to cr-lf when the text gets printed (and the reverse occurs when you are reading from a text file). If you don't want the cr, uncomment the binmode line.