Click here to get back home

How to get a full trace of a prog's execution?

 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
How to get a full trace of a prog's execution? kj 10-30-2006
Get Chitika Premium
Posted by kj on October 30, 2006, 1:07 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 Ferry Bolhar on October 31, 2006, 5:27 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
trace of method calls November 28, 2007, 5:00 am
Need to trace the output of Mime::Lite module (HELP) June 26, 2006, 6:30 am
how to trace a error those generated at runtime by server in soap::Lite August 19, 2004, 12:17 am
Do sparse arrays take up full memory? February 25, 2005, 8:28 am
full-text indexing of pdf, rtf, txt, html November 16, 2005, 5:36 pm
How can I get the full path for the running script (like $0) January 25, 2006, 8:18 pm
Help me get "Directory" out of full windows path name? February 21, 2006, 12:12 pm
Re: languages with full unicode support July 4, 2006, 12:05 pm
Reading in data until I have a full structure February 25, 2007, 1:55 pm
Alternatives to Safe.pm (not full of security holes)? May 12, 2005, 5:05 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap