Click here to get back home

Call tree for perl?

 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
Call tree for perl? kj 11-30-2004
Posted by kj on November 30, 2004, 2:12 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
Generalized Suffix Tree in XS / Perl December 15, 2005, 11:46 am
Parse tree like data like XML by Perl? October 8, 2006, 10:08 pm
Does recursive call able to print in same page as main call July 1, 2006, 7:32 am
Tree View July 3, 2005, 10:59 pm
XML::Smart, how to print out tree January 9, 2005, 6:42 pm
Expanding tree paths July 19, 2005, 10:48 am
Build Balanced Tree November 5, 2005, 7:25 pm
the use of removeChild() in Tree::Simple June 23, 2007, 8:18 am
display in a tree structure March 26, 2008, 7:07 am
File::Find and tree copying June 1, 2005, 4:21 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap