Click here to get back home

epic debugger and "my" variables

 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
epic debugger and "my" variables Kiwi 04-10-2005
Posted by Kiwi on April 10, 2005, 12:39 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 Hendrik Maryns on April 10, 2005, 10:11 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
Suggestion: Use EPIC as a perl editor/debugger October 20, 2004, 3:43 am
EPIC and "my" variables June 12, 2008, 10:55 am
Invisible variables in Perl debugger February 3, 2005, 6:13 am
Invisible variables in Perl debugger II May 30, 2005, 2:31 am
regular expression variables under debugger August 24, 2006, 4:53 am
Perl on Eclipse, EPIC April 3, 2008, 6:59 am
EPIC : a very good Perl IDE April 22, 2008, 4:13 am
debugger November 18, 2006, 9:40 pm
How to construct new variables in a script from other variables and strings. May 12, 2006, 4:51 am
Debugger angst July 30, 2004, 7:30 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap