Click here to get back home

simple response not implemented

 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
simple response not implemented Nospam 08-01-2007
Posted by Nospam on August 1, 2007, 7:08 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 Jim Gibson on August 1, 2007, 1:33 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
It's simple code but I got 400 URL must be absolute and it says it's a Internal response December 7, 2005, 2:41 pm
Weak references are not implemented in the version of perl at /tmp/replacebinary/Getopt/LL/DLList/Node.pm line 11 November 3, 2007, 11:30 pm
Help testing post response July 13, 2004, 3:05 pm
XML Response customizing using PERL June 19, 2006, 1:41 pm
HTTP::Response and gzip July 25, 2006, 12:46 pm
Does anybody know why mx1.hotmail.com doesn't response correctly? Thanks June 11, 2007, 4:09 pm
Using a buffer with HTTP::Response? May 23, 2008, 6:50 am
HTTP::Request response September 23, 2008, 3:28 pm
FAQ: What is the correct form of response from a CGI script? October 22, 2004, 11:10 am
FAQ 9.1 What is the correct form of response from a CGI script? March 16, 2005, 12:03 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap