wrote:
> find (sub{push @dirList, $File::Find::name},$localdir);
>
> I want to perform specific function if the element in @dirList is a
> file and perform some other function if element is a directory. Is
> there a way to distinguish between file and directory in this list?
I would make that distinction before putting the name into an array.
use File::Find;
find(sub {push @{-d $_ ? \@dirs : \@files}, $File::Find::name}, $localdir);
print "$_ is a directory\n" foreach @dirs;
print "$_ is not a directory\n" foreach @files;
-Joe