Click here to get back home

sending info to forms

 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
sending info to forms roach 11-20-2004
Posted by roach on November 20, 2004, 1:33 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 Todd de Gruyl on November 19, 2004, 7:43 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
Re: sending info to forms November 20, 2004, 1:34 am
www::mechanize and forms November 5, 2006, 4:47 pm
forms, cgi - beginner question February 15, 2005, 10:39 am
posting https forms January 9, 2007, 10:36 am
Multiple CGI forms on one page February 8, 2007, 4:24 pm
submitting a form when two forms with the same name February 2, 2008, 10:54 pm
Basic Question: Local Forms January 14, 2005, 9:45 am
forms suddenly stopped working March 10, 2005, 2:47 pm
Forms using Perl vs PHP or others? (speed/volume) February 16, 2006, 6:01 pm
Web Forms / Perl / SPAM detection May 3, 2007, 9:40 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap