Hi,

I'm still new to Perl and was just curious if the code below is ok to use.  
Also, can someone direct me to more 
information about file::find?  I'd like to know if -d means directory (I assume 
it does) as well as -f and other 
options that may apply.  Basically, I want to loop thru all files in a folder 
(including nested folders too) and then 
create a hash whose key is the file name and value is the full path to the 
file.  I don't want to grab any paths to 
just directories or invisible files.  Thanks.

Jay

#!/usr/bin/perl -w

use File::Find;

%files = ();

find(sub { if (!/^\./ && !-d) { $files{$_} = $File::Find::name } }, 
"/Volumes/Server/Folder/Path/");

print $files{"sku123"};  # example of getting item out of hash

Reply via email to