in reply to Get File list from the path

I'm guessing you want a list of all files in a directory including those in sub-directories.

If so, the following will work under Windows and Unix systems:

use File::Find; my @list; find(sub { push(@list, $File::Find::name) }, "/your/path"); # @list contains all file objects at and under /your/path
To include only files, modify as follows:
find(sub { -f $_ && push(@list, $File::Find::name); 1 }, "/your/path") +;

Replies are listed 'Best First'.
Re^2: Get File list from the path
by mandarin (Hermit) on Apr 24, 2008 at 08:02 UTC
    another alternative would be to use File::Util
    use File::Util; my($f) = File::Util->new(); my($dirs, $files) = $f->list_dir('your/root/directory', qw/--recur +se --as-ref/);
    see File::Util for details