in reply to Re^2: Is there a Dir/File::Find
in thread Is there a Dir/File::Find

Within "wanted", you want to use "$_", not "$File::Find::name", because you are chdir'ed down into the directory. Just use "-d" for example, because it defaults to $_.

So, your code would look like:

use File::Find; find (\&ProcessDirTree, './_NewExtensionTemplate'); sub ProcessDirTree { print "Dir: $File::Find::name\n" if -d; print "File: $File::Find::name\n" unless -d; }

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re^4: Is there a Dir/File::Find
by GrandFather (Saint) on Jul 29, 2005 at 03:38 UTC

    Smacks forehead with palm of hand and wanders red-faced off into the distance muttering "I knew that, I knew that"!

    Thanks merlyn!


    Perl is Huffman encoded by design.