Click here to get back home

Server-Clienrt Connect over Internet

 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
Server-Clienrt Connect over Internet deadpickle 12-15-2006
Get Chitika Premium
Posted by deadpickle on December 15, 2006, 12:01 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

Posted by Jim Gibson on December 15, 2006, 1: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
connect to a database when using a proxy (to access the internet) August 31, 2005, 9:14 am
connect a database in remote server (can connect to the server via SSH) July 17, 2007, 12:35 pm
internet module? July 8, 2005, 10:48 am
Information transfer over the internet March 31, 2005, 10:46 am
Problems with Win32::Internet FTP->put August 17, 2006, 5:26 pm
Internet Explorer 7 Released December 19, 2006, 11:56 am
Automating Internet Explorer February 24, 2007, 3:57 pm
Seeking Internet Protection Service December 8, 2004, 1:33 pm
Seeking Internet Protection Service December 8, 2004, 1:34 pm
Seeking Internet Protection Service December 8, 2004, 1:37 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap