Click here to get back home

Newbie HTTP::Request->new(POST => URL); question

 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
Newbie HTTP::Request->new(POST => URL); question qa4ever 10-31-2004
Posted by qa4ever on October 31, 2004, 10:30 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 Brian McCauley on November 3, 2004, 4:07 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
HTTP POST without LWP December 26, 2006, 6:07 pm
How do I PUSH an HTTP::POST using perl LWP? July 23, 2008, 6:26 pm
HTTP::Request::Common Post problem November 5, 2006, 11:22 pm
HTTP::Request::Common and long Text via POST March 13, 2006, 9:55 am
Curl/Perl http post performanc issue August 2, 2006, 10:43 pm
another 'POST from perl' question January 14, 2005, 6:46 am
HTTP Proxy via HTTP Layer by Perl? October 19, 2004, 5:56 pm
newbie question September 12, 2004, 11:06 am
A newbie question October 14, 2004, 7:51 pm
Newbie Question November 6, 2004, 6:10 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap