Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re: Notepad: I'm seeing squares.

by ikegami (Pope)
on Nov 23, 2005 at 15:47 UTC ( #511136=note: print w/replies, xml ) Need Help??

in reply to Notepad: I'm seeing squares.

I've tried to swap \n for \r\n

Like people have said, this should have worked. Notepad expects \r\n for line ends. Either 1) your file didn't use \n for line ends originally, or 2) you convertion code has a bug (and you probably ended up with \r\r\n).

A simple one liner to convert from \n to \r\n (when run from a Windows machine) is:

perl -pe1 infile > outfile
The above is similar to the following code:
open(my $fh_in, '<', $file_in) or die("Unable to open $file_in: $!\n"); open(my $fh_out, '>', $file_out) or die("Unable to create $file_out: $!\n"); print $fh_out $_ while <$fh_in>;

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://511136]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2021-10-22 14:12 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (85 votes). Check out past polls.