Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
File::Find appears to be very flexible in how it parses directory trees, but it takes a coderef to a subroutine.
Is it possible to use a method? I have some state information which would be really useful to access from within the subroutine, and passing the self reference to the function would be extremely helpful. I guess I could assign self to a global module variable and access this from within the subroutine, but this seems like a kludge.
Any suggestions would be greatly appreciated.
Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can File::Find call a method?
by afoken (Chancellor) on Mar 14, 2012 at 20:47 UTC |