in reply to Recursive opendir without
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--
|
|---|