>-----Original Message----- >From: Rob Dixon [mailto:rob.di...@gmx.com] >Sent: Thursday, January 06, 2011 21:49 >To: David Wagner >Cc: beginners@perl.org >Subject: Re: Getting LineFeed for Excel within q quoted field > >At 11:55 -0600 06/01/2011, David Wagner wrote: >> >> For something that should have been relatively easy, this has been a >> real pain in getting to work as I would have expected it to. >> ...So to get things in what I believe was a correct setup and using >> the binmode which was giving me what I thought Excel wanted, I >> replaced my \n with \r\n and did the \x0a for the soft returns. Now >> when it is opened in Excel, there are no question marks in either of >> the two columns that I am doing soft returns.. > >Hi David > >The strings "\n" and "\x0A" are identical - it is the translation done >by Perl's IO system that makes the difference. > > From this description it looks like you have things working. The >question marks in the fields were surely a bad sign? Please say if you >still need help. > >- Rob I appreciate the response. Yes, I have it going, but to me it seems like there should be an easier way of doing it. I ended up replacing each \n with \r\n and doing the \x0a. Then when I am ready to write out the csv, then I do binmode on the output file and it writes out correctly.
So the bottom line becomes if using hex changes and it stands for some pre-defined value or variable within Perl, then one has to take some extra ordinary measures to make things work... Slow but sure... Thanks. Wags ;) David R. Wagner Senior Programmer Analyst FedEx Services 1.719.484.2097 Tel 1.719.484.2419 Fax 1.408.623.5963 Cell http://Fedex.com/us -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/