You can also just move the 'wanted' sub outside the 'indexfiles' sub and it should function exactly the same. However passing variables to it is tricky.
____________________
Jeremy
I didn't believe in evil until I dated it.
Comment on Re: Using File::Find with a bit of elegance