programming-examples/perl/File/Change file handle to binary mode.pl
2019-11-15 12:59:38 +01:00

11 lines
161 B
Perl

open (FILEHANDLE, ">data.txt")
or die ("Cannot open data.txt");
binmode FILEHANDLE;
print FILEHANDLE "Hello\nthere!";
close (FILEHANDLE);