Click here to get back home

hwo to post to a form?

 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
hwo to post to a form? Travis 08-10-2005
Get Chitika Premium
Posted by Travis on August 10, 2005, 7:25 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 Larry on August 10, 2005, 3:19 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
Form Post April 18, 2008, 7:17 pm
Re: How do you track down the way to POST a form ? February 19, 2008, 8:19 pm
Accessing form POST data July 24, 2004, 10:24 pm
Parsing form POST without CGI.pm on Win32 August 1, 2004, 12:20 am
htaccess rewriterule in combination with POST form January 28, 2005, 12:38 am
using LWP to POST data via "javascript:document.form.submit()" link January 3, 2006, 1:20 am
HTTP::Request::Form - Can't submit a form with input type=image button January 31, 2005, 11:42 pm
LWP::UserAgent post to post other than 80 October 11, 2005, 11:33 pm
LWP Post October 21, 2004, 4:59 am
Lwp Post Problem September 1, 2004, 4:09 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap