[Omaha.pm] Perl and recursion...

Jay Hannah jay at jays.net
Tue Nov 15 13:26:52 PST 2005


On Nov 15, 2005, at 1:44 PM, Daniel Linder wrote:
>  I agree -- when I take out the '&ProcFiles("$dir/$file");' line, it 
> continues through the /tmp directory fine.  With the recursive call to 
> itself, I can watch the script dive into the sub-directory 
> (/tmp/dir1), and it processes all the files in /tmp/dir1, but when it 
> finishes with the files in "dir1" the program quits.  Unless I am 
> missing something, I thought it should go back one level to the 
> initial invocation of ProcFiles and continue where it left off 
> there...

Can you paste the output of the program to the list? That would help me 
understand what's happening.

Recursion is tricky. If it was working what were you wanting to 
actually do to each file/dir you found?

Thanks,

j



More information about the Omaha-pm mailing list