Click here to get back home

Perl flow/code diagramming tools?

 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 flow/code diagramming tools? ixtahdoom 09-08-2004
Posted by ixtahdoom on September 8, 2004, 7:05 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 Mark Clements on September 9, 2004, 12:01 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
vi "power tools" for Perl coding? February 14, 2005, 4:00 am
looking for tools/methods to document source code (non-PERL) September 21, 2007, 4:52 am
any tools to enable test automation for scripting language like perl? October 8, 2004, 6:45 am
[ANNOUNCE] Software tools for Perl (coverage, profiling, flow tracing) April 6, 2006, 9:04 am
updating tools July 10, 2005, 11:20 am
Diff Tools October 17, 2005, 11:11 pm
Visualising / overview tools March 28, 2008, 11:29 am
Static Code Analysis Tools? December 15, 2004, 7:48 pm
MIME::Tools infinite loop June 20, 2005, 7:18 am
ISO regex analysis and debugging tools November 16, 2005, 12:24 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap