This bit of code generates a file with all three types of new line in
it
open(TESTFILE, "> test.txt")
or die "Sorry, cannot open the test file";
binmode(TESTFILE);
print TESTFILE "This is a DOS line ending\x0d\x0a";
print TESTFILE "This is a Mac line ending\x0d";
print TESTFILE "This is a Unix line ending\x0a";
print TESTFILE "This is a DOS line ending\x0d\x0a";
print TESTFILE "This is a Mac line ending\x0d";
print TESTFILE "This is a Unix line ending\x0a";
print TESTFILE "This is a DOS line ending\x0d\x0a";
print TESTFILE "This is a Mac line ending\x0d";
print TESTFILE "This is a Unix line ending\x0a";
close TESTFILE;
print "The test file test.txt has been successfully written\n";
Stéphane JEAN BAPTISTE wrote:
> Hi
>
> I need the (hexa?) code for trailing newline, but not "\n". I need a
> code like (é or é for é)
>
> tks