Click here to get back home

Standard output problem

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Standard output problem wesphillips 10-11-2006
Get Chitika Premium
Posted by wesphillips on October 11, 2006, 4:35 pm
Please log in for more thread options
>>
>> [snip]
>>
>> > if I print "$1\n",
>> > the file prints just fine. But, if I do something like print "$1 after
>> > \n", the whole output is messed up. If I print "before $1\n", nothing
>> > prints at all. If I print "before $1 after\n", only after prints.
>>
>> not really sure, but could be a rogue "\r" in $1,


> There
> is a rogue carriage return (0xd) in the string

> Is there something I can do to deal with this
> situation?


Repair the corrupted file:

perl -p -i -e 'tr/\r//d' bad_file


--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas

Similar ThreadsPosted
Standard output problem October 11, 2006, 4:35 pm
Direct standard output to printer. February 22, 2007, 10:00 pm
standard output issue when launching a child script June 18, 2005, 8:01 pm
piping cmd output problem March 22, 2005, 4:45 am
Strange output problem September 26, 2006, 4:34 pm
Problem getting command output October 29, 2007, 3:06 pm
Problem getting command output October 29, 2007, 3:06 pm
Problem parsing tcpdump tcp[13] output December 1, 2004, 9:44 am
Problem in Enforcing utf8 coding for output May 25, 2007, 8:48 pm
Silencing TODO output from Test::Harness output October 17, 2006, 1:07 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap