in reply to Re^3: file modifications using file::find
in thread file modifications using file::find

Hi kcott!

Yes, my reply to your post was meant to be a compliment.

I have no idea of what the OP is trying to accomplish. There is a huge amount that is left unsaid.

As a very simple example, I present this code (create found, populate found, do something with found):

#!/usr/bin/perl use strict; use warnings; use File::Find; # lists all "normal files" which are both readable and # writeable underneath "C:/test" my @found; find( { wanted => \&get_files }, "C:/test" ); print "$_\n" for @found; sub get_files { return unless ( -f $File::Find::name and -r _ and -w _); push @found, $File::Find::name; } __END__ printed on my machine: Note that the sub directory of "subdirtest" is skipped. A directory name fails the -f test. C:/test/maur-1110.tiff C:/test/maur-1111.psd C:/test/TUMI-1354839054_alt1_.psd C:/test/subdirtest/docinbsubdir.txt C:/test/subdirtest/New Text Document.txt