Click here to get back home

HTTP::Request::Common Post 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
HTTP::Request::Common Post problem matlaw 11-05-2006
Get Chitika Premium
Posted by matlaw on November 5, 2006, 11:22 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 zentara on November 6, 2006, 8:48 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
HTTP::Request::Common and long Text via POST March 13, 2006, 9:55 am
Problem with file-upload using HTTP::Request::Common March 19, 2006, 6:43 pm
need help with HTTP::Request::Common March 12, 2005, 3:11 pm
Newbie HTTP::Request->new(POST => URL); question October 31, 2004, 10:30 pm
re: problem CGI read request POST February 15, 2007, 10:42 am
script for http request February 15, 2007, 10:39 am
Re: How to submit an HTTP Request with XML March 11, 2008, 3:17 pm
HTTP::Request response September 23, 2008, 3:28 pm
LWP HTTP request corrupted file February 16, 2005, 2:05 pm
HTTP::Request/GET response not expected May 6, 2005, 12:00 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap