Click here to get back home

Server-side programming for form processing

 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
Server-side programming for form processing stephenburgess1972@hotmail.com 01-06-2006
Get Chitika Premium
Posted by stephenburgess1972@hotmail.com on January 6, 2006, 7:55 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 usenet on January 6, 2006, 8:42 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
serverside perl: process October 27, 2004, 8:49 pm
HTTP::Request::Form - Can't submit a form with input type=image button January 31, 2005, 11:42 pm
Perl Extreme Programming download now | http://freepdf-ebook.blogspot.com/2007/12/extreme-perl-programming.html December 25, 2007, 3:28 pm
Processing a while within a while November 13, 2007, 7:54 am
help in array processing June 2, 2006, 6:23 pm
To do parallel processing.. January 8, 2007, 5:22 am
Looking for C++ macro processing solution November 3, 2004, 10:46 am
processing large files April 6, 2006, 2:42 pm
fiel reading and processing April 22, 2006, 9:54 pm
Processing N Jobs iteratively April 27, 2006, 12:58 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap