$ mkdir logs $ touch logs/file1 $ touch logs/file2 $ touch logs/file3 $ touch logs/file4 $ perl -wl use File::Find; # Print filenames in directory 'logs', but skip directories # and files containing 'file1' find( sub { return if (-d or /file1/); print; }, q{logs}); __END__ file4 file3 file2