in reply to recursive path function falls into infinite loop
Okay, this is redundant, well-known and ignores your question completely (please dont mod me down...) but you should use File::Find.
I understand people might not want to use CPAN modules, because they need to be installed, sometimes need to be compiled, and you have to trust the module author at least a little bit. But File::Find is actually included in the standard Perl distribution, does not need to be compiled or installed, and as a standard module has passed some serious quality control. Any chance this could convince your employer?
This is like a Java programmer being asked not to use anything from java.util.* .
|
|---|