Link to home
Start Free TrialLog in
Avatar of Ishani
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";
}
Avatar of clockwatcher
clockwatcher

use File::Find;

find(\&search, ".");

sub search {
 print $File::Find::name . "\n";
}

Avatar of Ishani

ASKER

doh. i thought it used current directory.

Its working now, thanks..

add this as a question and have the points...
ASKER CERTIFIED SOLUTION
Avatar of clockwatcher
clockwatcher

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial