Saturday, March 24, 2007

Using perl's File::Find

Perl's File::Find module


What does it do? What I understood

Use the find OR finddepth methods after "use"ing File::File;

find (\&wanted, '/path/name/');

This goes to all the directories in the "/path/name/" find all the files. In the subroutine select the required file.

for example
find (wanted=>sub{print $_;} '/path/name');
would print all files in /path/name/

No comments: