Click here to get back home

Curious internal error

 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
Curious internal error nachtvogel 01-20-2006
Posted by nachtvogel on January 20, 2006, 4:31 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 January 20, 2006, 4:58 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
Error with script - internal error or misconfiguration January 27, 2005, 5:09 am
INTERNAL SERVER ERROR (WIERD???) August 31, 2005, 5:16 am
grep causes internal server error April 23, 2007, 5:14 pm
CGI-Timeout causing "internal server error"???? July 20, 2006, 4:58 pm
curious behavior with shift (perl 5.8)? May 12, 2005, 12:36 pm
WriteExcel internal hyperlink August 5, 2004, 8:31 am
Internal limit on variable length? August 26, 2008, 7:10 am
accessing perl's internal hashing algorithm September 27, 2004, 9:14 am
It's simple code but I got 400 URL must be absolute and it says it's a Internal response December 7, 2005, 2:41 pm
filename charset and internal Perl utf8 June 8, 2006, 2:48 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap