Click here to get back home

Perl debugger has wrong initial entry point and line numbers

 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
Perl debugger has wrong initial entry point and line numbers luke_airig 02-09-2005
Get Chitika Premium
Posted by luke_airig on February 9, 2005, 11:02 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 J. Gleixner on February 9, 2005, 3:23 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
How to step over a line in the debugger? May 23, 2005, 4:17 am
line-oriented debugger December 20, 2005, 3:04 pm
line-oriented debugger December 20, 2005, 3:28 pm
Free to wrong pool 2227b8 not 3d5a2aa0 at C:/Perl/lib/XSLoader.pm line -1. July 14, 2006, 2:45 am
Higher-Order Perl: The Quest for an Accessible Version, Initial Impressions (Long) April 1, 2006, 7:12 pm
FAQ 6.2: I'm having trouble matching over more than one line. What's wrong? December 22, 2004, 12:03 pm
FAQ 6.2 I'm having trouble matching over more than one line. What's wrong? January 20, 2005, 6:03 pm
FAQ 6.2 I'm having trouble matching over more than one line. What's wrong? March 31, 2005, 12:03 pm
FAQ 6.2 I'm having trouble matching over more than one line. What's wrong? June 16, 2005, 5:03 pm
FAQ 6.2 I'm having trouble matching over more than one line. What's wrong? September 30, 2005, 4:03 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap