Personally, I would learn about recursion from a text book and use File::Find instead:
use strict; use File::Find; @ARGV = '.' unless @ARGV; find sub { # do something with $_ # which is the name of the current file print "got one!\n" if m/\.mp3$/; }, @ARGV;
Jeff
R-R-R--R-R-R--R-R-R--R-R-R--R-R-R--
L-L--L-L--L-L--L-L--L-L--L-L--L-L--
In reply to (jeffa) Re: Recursive opendir without
by jeffa
in thread Recursive opendir without
by bobione
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |