use strict; use warnings; open(my $fh,'>:unix','abc.txt') or die $!; print $fh "one line\n" #### use strict; use warnings; open(my $fh,'>:unix','abc.txt') or die $!; print $fh "one line\n" close $fh; # No error message on unlink unlink 'abc.txt' or die $!; #### use strict; use warnings; open(my $fh,'>','abc.txt') or die $!; binmode($fh,':unix'); print $fh "one line\n" close $fh; # Error message on unlink unlink 'abc.txt' or die $!;