Click here to get back home

Web form's reply on same page as 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
Web form's reply on same page as form. John 02-13-2006
Get Chitika Premium
Posted by John on February 13, 2006, 2:41 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 Gunnar Hjalmarsson on February 13, 2006, 3:02 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 Ian Wilson on February 13, 2006, 5:23 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
Re: download with HTML::FORM login and password on page April 28, 2008, 7:43 am
How do I reply a NNTP message? December 6, 2005, 12:46 am
Issues to post reply June 1, 2007, 1:26 am
Mail::Mailer - 'Reply To' August 10, 2008, 10:20 pm
Thanks for reply to Perl core dump issue .. i have found a work around ... February 3, 2005, 9:28 pm
How to check a form's field and exit Perl program if it has a value? July 7, 2007, 2:08 pm
The incorrect content length problem with Apache, how to stop waiting for data, and send a reply in CGI? September 22, 2005, 7:51 am
LWP user agent grabs the intermediate wait page after POST intead of the actual result page February 12, 2008, 12:50 am
transfer value from one page to single frame of a second,frameset page September 14, 2008, 7:25 am
HTTP::Request::Form - Can't submit a form with input type=image button January 31, 2005, 11:42 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap