Click here to get back home

pipes in Windows perlfork emulation

 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
pipes in Windows perlfork emulation Henry Townsend 04-10-2005
Get Chitika Premium
Posted by Henry Townsend on April 10, 2005, 9:43 am
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
Windows fork emulation (and buffering?) problem April 7, 2005, 10:50 am
Any 3270 emulation for perl yet? February 22, 2007, 7:18 am
Pop3 emulation for Outlook Client April 1, 2007, 8:54 am
pipes problem September 28, 2004, 3:51 pm
Output pipes December 22, 2004, 7:18 pm
unix pipes to perl scripts March 14, 2005, 6:34 am
Perl, Pipes and error return codes August 13, 2007, 10:38 pm
perl problem with select and non-blocking sysread from multiple pipes March 1, 2005, 4:33 am
windows program return values vs perl return values from a call to system() -- windows post only October 29, 2005, 6:22 pm
Windows CE, Windows Mobile November 27, 2006, 4:08 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap