use strict; use IO::File; my $fh = new IO::File("> qqq.txt"); defined($fh) || die "Cannot open qqq.txt\n"; #binmode($fh); my $CRLF = "\015\012"; print $fh "test",$CRLF; close $fh;