moshe12009 has asked for the wisdom of the Perl Monks concerning the following question:
thanks for help...sub Again { $dirtoget= $_[0]; if(opendir(DH, $dirtoget)) { @thefiles = readdir(DH); closedir(DH); if(@thefiles) { foreach $f (@thefiles) { next if ($f eq "." or $f eq ".."); print "$f\n"; if(-d "$dirtoget/$f") { Again("$_[0]/$f"); } } } } else { return; } } $dirtoget = "c:/Exam"; Again($dirtoget);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: recursing problem
by BrowserUk (Patriarch) on Apr 20, 2012 at 11:45 UTC | |
by dave_the_m (Monsignor) on Apr 20, 2012 at 13:24 UTC | |
by BrowserUk (Patriarch) on Apr 21, 2012 at 07:45 UTC | |
by Anonymous Monk on Apr 20, 2012 at 20:51 UTC | |
|
Re: recursing problem
by JavaFan (Canon) on Apr 20, 2012 at 10:54 UTC | |
|
Re: recursing problem
by Anonymous Monk on Apr 20, 2012 at 10:45 UTC | |
by stevieb (Canon) on Apr 20, 2012 at 11:34 UTC | |
|
Re: recursing problem
by Marshall (Canon) on Apr 22, 2012 at 07:27 UTC |