sub wanted { my $clog_filehandle = shift; my $rlog_filehandle = shift; # $_ is file name (File::Find thing) my $file = $_; print "In wanted(), checking $file...\n"; copy_file( $file, $clog_filehandle, $rlog_filehandle) if (-f $f); }