Click here to get back home

XML-RPC on Windows

 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
XML-RPC on Windows gcgaim 07-17-2007
Posted by gcgaim on July 17, 2007, 11:24 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

Posted by Sisyphus on July 17, 2007, 11:49 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
XMLRPC::Lite June 14, 2006, 2:24 pm
Memory leak with XMLRPC and Perl... January 31, 2007, 2:25 am
Memory leak with XMLRPC and Perl... January 31, 2007, 2:25 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
Tar on Windows XP January 29, 2007, 5:27 pm
SSH on windows September 10, 2007, 9:48 pm
Anyone using IPC::Cmd on Windows? May 5, 2008, 8:39 am
Looking for a better shell for windows 2K July 21, 2004, 6:00 pm
run Perl under windows December 25, 2004, 7: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