Click here to get back home

Tree view of directory while using Subversion

 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
Tree view of directory while using Subversion James E Keenan 11-13-2005
Posted by James E Keenan on November 13, 2005, 4:59 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 Dr.Ruud on November 13, 2005, 8:14 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
Tree View July 3, 2005, 10:59 pm
An efficient way to make a large directory tree? December 3, 2004, 5:11 pm
Script for migrating HTML tree into a single directory ? September 23, 2005, 10:41 am
Komodo and subversion May 26, 2005, 10:37 am
Correct newlines for Perl programs in subversion? June 26, 2007, 10:21 am
cant view my .pl file with IE September 3, 2004, 1:32 am
a cgi for view unix logs? February 13, 2007, 2:45 am
How to view error messages within a function March 8, 2005, 11:27 am
Displaying 12 images from dir with option to view next 12 etc September 12, 2005, 7:24 am
Have you always desired to view The Simpsons humping in incest? July 19, 2004, 2:09 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap