in reply to Re: Perl List files in directory
in thread Perl List files in directory
... already does what you intend...
All three of the OP's examples don't descend into subdirs, this one does. Also, this code doesn't show which subdir the file was found in, so you'd probably want something like this instead:
find({wanted => sub {-f and print "file = $File::Find::name\n"},follow => 1},"/opt/tmp");
|
|---|