Ishani
asked on
File::Find doesn't seem to work...
Very simple one this - I am trying to do a recursive file tree search. I thought that the find function from File::Find would suit my needs. The following script, however, does nothing - it doesn't even seem to call the subroutine.
use File::Find;
find(\&search);
sub search
{
print File::Find::name . "\n";
}
use File::Find;
find(\&search);
sub search
{
print File::Find::name . "\n";
}
ASKER
doh. i thought it used current directory.
Its working now, thanks..
add this as a question and have the points...
Its working now, thanks..
add this as a question and have the points...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
find(\&search, ".");
sub search {
print $File::Find::name . "\n";
}