programming-examples/perl/File/Change file handle to binary mode.pl

11 lines
161 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
open (FILEHANDLE, ">data.txt")
or die ("Cannot open data.txt");
binmode FILEHANDLE;
print FILEHANDLE "Hello\nthere!";
close (FILEHANDLE);