Hi,
I am wondering whether output generated by the following scripts are same on Linux and Windows machines.
use strict;
use warnings;
my $output = "output.txt";
die "can't open output file: $!" unless open FH, ">$output";
printf(FH "%s\n", "there won't be any junk characters in this version"
+);
close FH;
use strict;
use warnings;
my $output = "output2.txt";
die "can't open output file: $!" unless open FH, ">$output";
printf(FH "%s\r\n", "I wonder any junk charcter will be printed to the
+ file on windows");
close FH;
Can you please suggest which one is more portable?