Harry Putnam wrote:
I'm already bald so don't have the luxury of pulling hair over this.
I don't understand the error ouput or maybe I could get somewhere with
this. Pouring over perldoc File::Copy isn't helping either... I
think the error is before that but can't see what.
The end result of this script is supposed to be a directory named
./tmp with any copied files renamed into it.
The incoming files from ./dir1 ./dir2 are all files with numeric
names. The total of them is 117
If I leave out the copy part it prints just what you'd expect so
somehow when inserting the copy funtion things change.
It fails on the first copy:
hpdb cp'ing ./dir1/2765 => ./tmp/001
Failed to copy ./dir1/2765 => ./tmp/001: No such file or directory
at ./renum2.pl line 111
When File::Find goes looking for files, it chdir's to each directory its
looking in. When it's in ./dir1, there is no ./dir1/tmp to copy files
into, so you get an error. Change your calling sequence of find() to:
find( { wanted => \&wanted, no_chdir => 1, }, @searchdir);
See `perldoc File::Find` for details.
--
Just my 0.00000002 million dollars worth,
--- Shawn
"Probability is now one. Any problems that are left are your own."
SS Heart of Gold, _The Hitchhiker's Guide to the Galaxy_
"This statement is true but unprovable."
Kurt Godel
* Perl tutorials at http://perlmonks.org/?node=Tutorials
* A searchable perldoc is at http://perldoc.perl.org/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>