newline problem

2010-02-01 Thread Michom
HI, I am new to perl and I have written a smal script to grab data from one file, and put them into another file. The problem is new lines, which are printing nice under a linux environment, but it is all messed up if I open it with notepad. I am running Perl 5 under cygwin. Heres the script: #!/

AW: newline problem

2010-02-01 Thread Thomas Bätzler
Michom asked: > I am new to perl and I have written a smal script to grab data from > one file, and put them into another file. The problem is new lines, > which are printing nice under a linux environment, but it is all > messed up if I open it with notepad. I am running Perl 5 under cygwin. Thi

Re: newline problem

2010-02-01 Thread Shawn H Corey
Michom wrote: > open (WRITE, ">rel.txt") || die "Can't find rel.txt\n"; Try: open my $write_fh, '>:crlf', "rel.txt" or die "could not open rel.txt: $!\n"; You will have to change WRITE to $write_fh in the rest of the code. -- Just my 0.0002 million dollars worth, Shawn Programming is as

Re: newline problem

2010-02-01 Thread John W. Krahn
Michom wrote: HI, Hello, I am new to perl and I have written a smal script to grab data from one file, and put them into another file. The problem is new lines, which are printing nice under a linux environment, but it is all messed up if I open it with notepad. I am running Perl 5 under cygw

color and newline problem (Term::ANSIColor)

2009-12-31 Thread Francesco Stablum
Hello everyone, i'm a newbie, and I'm trying to write a simple perl script that takes the stdin and prints it to stdout adding colors that alternates on odd and even lines. The problem is that the newline charachter seems to align to the next line colors and not of the current. [code] use Term::A

Re: color and newline problem (Term::ANSIColor)

2009-12-31 Thread Shawn H Corey
Francesco Stablum wrote: > Hello everyone, > > i'm a newbie, and I'm trying to write a simple perl script that takes > the stdin and prints it to stdout adding colors that alternates on odd > and even lines. > The problem is that the newline charachter seems to align to the next > line colors and

Re: color and newline problem (Term::ANSIColor)

2009-12-31 Thread Jeremiah Foster
On Dec 31, 2009, at 14:05, Francesco Stablum wrote: > Hello everyone, > > i'm a newbie, and I'm trying to write a simple perl script that takes > the stdin and prints it to stdout adding colors that alternates on odd > and even lines. > The problem is that the newline charachter seems to align t