in reply to Re^2: File::Find Usage with 2 subroutines
in thread File::Find Usage with 2 subroutines
One more observation meanwhile, if I change the second find call from find(\&findb, "/pqr") to find(&findb, "/pqr"), it does enter findb sub now but the file pointed by $File::Find::name is still from the /abc/xyz folder, i.e file1.
That is to be expected. It actually calls findb() before calling File::Find::find() -- that's what the syntax means. It's not a subroutine reference but a call.
Anyway, there is no problem with your code as you've posted; I'd look into other possible problem areas such as file system permissions and the logic in the rest of your script
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: File::Find Usage with 2 subroutines
by pnaik (Initiate) on Jun 17, 2013 at 09:36 UTC | |
by talexb (Chancellor) on Jun 17, 2013 at 19:10 UTC |
In Section
Seekers of Perl Wisdom