Click here to get back home

inconsistent warning production

 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
inconsistent warning production JimJJewett 05-20-2005
Get Chitika Premium
Posted by JimJJewett on May 20, 2005, 9: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 Brian McCauley on May 20, 2005, 6:44 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
Untraceable warning: "Warning: Use of "require" without parentheses is ambiguous at (eval 23) line 1." May 16, 2006, 9:45 pm
Threading and production environments February 3, 2006, 2:05 pm
Installing CPAN modules in production system August 7, 2008, 3:43 am
Why put a debug option in a production code perl script? May 24, 2007, 3:48 pm
Inconsistent behavior between SQL*Plus and Perl DBI July 19, 2004, 2:52 pm
Syntax appears inconsistent - why is this? September 29, 2004, 8:48 pm
Inconsistent returns from piped open February 16, 2006, 11:10 pm
CGI.pm filefield return is inconsistent between I.E and Opera/Firefox May 18, 2007, 1:04 pm
How do I get rid of this warning? November 29, 2006, 3:13 am
using range gives warning October 22, 2004, 6:29 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap