You're right, of course. I originally had something like this:
my @anomalies; sub recurseDir2 { my @temp = (glob $_[0]); foreach (@temp) { if (-d $_) { print "Directory: $_" , "\n" ; recurseDir2("$_/*"); } elsif (-f $_) { print "File: $_ \n"; } else { push @anomalies, $_; } } } print "Anomalies: @anomalies";
but as I found no 'anomalies' in my filepaths I stupidly changed my code to what I posted. Thanks for pointing out my mistake.
dave
In reply to Re: Re: Re: Recursive sub
by Not_a_Number
in thread Recursive sub
by pen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |