Click here to get back home

CGI Error in wwwboard

 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
CGI Error in wwwboard duke 10-12-2006
Posted by duke on October 12, 2006, 2:53 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 October 12, 2006, 5:26 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
Question about wwwboard perfuctory April 22, 2008, 12:29 pm
Error with script - internal error or misconfiguration January 27, 2005, 5:09 am
perlcc error - 'Can't unlink error file...' April 7, 2006, 10:13 am
Problem directing BCP Error to Error file January 16, 2008, 6:20 am
Re: 533: error: syntax error before "void" March 24, 2006, 4:58 pm
Please confirm bug in SHLOMIF > Error-0.17 > Error July 26, 2006, 7:21 pm
Syntax error? What syntax error? Assignment fo default values? November 18, 2007, 11:36 am
What is this error? September 28, 2004, 1:19 pm
SQL ERROR November 15, 2004, 8:51 am
getting error January 3, 2006, 2:00 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap