Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: Quick File::Find Question

by buckaduck (Chaplain)
on May 06, 2001 at 05:57 UTC ( [id://78316] : note . print w/replies, xml ) Need Help??

in reply to Quick File::Find Question

Call your subroutine indirectly with an anonymous code reference instead:
while (<MAINDB>) { find( sub { wanted(\*C_LOG, \*R_LOG, $_) }, $_); }
If you like you can use my $file = shift; in the subroutine, instead of getting it from $_. It shouldn't actually matter, but I'm starting to see too many $_ variables in this short piece of code...