moroshko wrote:
Hello experts !

Hello,

What is the most efficient way to get a list of all file names (a full
path) in a certain directory ?
This should work recursively and include only files (not directories).

use File::Find;

my @all_file_names;

find sub {
    return if -d;
    push @all_file_names, $File::Find::name;
    }, '/certain/directory';

for my $path ( @all_file_names ) {
    print "$path\n";
    }



John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order.                            -- Larry Wall

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to