kamesh3183 has asked for the wisdom of the Perl Monks concerning the following question:
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;
Can you please suggest which one is more portable?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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Difference between using \r\n and \n on Linux and Windows machines
by bart (Canon) on Jun 09, 2005 at 06:55 UTC |