Click here to get back home

File::Find dies on directory paths which are too long

 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
File::Find dies on directory paths which are too long wbeldman 03-13-2007
Posted by wbeldman on March 13, 2007, 2:53 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
File::Find doesn't go down thru directory December 13, 2007, 5:27 pm
Wierd issue with File::Find and directory May 12, 2005, 7:35 am
Recursive directory read with File::Find April 22, 2008, 6:43 pm
Using File::Find and only manipulating 1 file per directory. December 16, 2005, 10:53 am
Invalid top directory at d:\perl\lib\file\find.pm line 562 September 27, 2007, 5:02 am
Migrating thousands of user home, profile, apps and groups directory paths August 20, 2005, 9:51 am
script to find the files with very long names June 12, 2006, 3:34 am
Find number of sub directories within a directory May 11, 2005, 8:39 am
Can't get perl to find .pm in my own private directory February 4, 2005, 3:06 pm
How to find all files in a directory with a specific mtime July 27, 2006, 6:39 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap