#! /usr/bin/perl use strict; use warnings; use File::Find; find ({wanted => \&wanted, preprocess=> \&preproc, no_chdir=>1}, @ARGV); sub wanted { print "wanted $_\n" } sub preproc { # print "Pre processing $_\n" foreach (@_); return grep {/^[A-Da-d]/}@_; }