You need to seperate your searching code off into a subroutine. Something like this might work:
parse_dir('.'); sub parse_dir { my $path = shift; opendir(HERE, $path) or die "$!\n"; while(readdir(HERE)) { next if /^\.(\.)[0,1]$/; parse_dir($_) if -d $_; #parse files here }
I'm sure others will offer a better solution.
!unlike
I write my Perl code like how I like my sex: fast and dirty. ;)
In reply to Re: Recursive Subdirectories
by !unlike
in thread Recursive Subdirectories
by pildor
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |