in reply to Problem using File::Find

The other answers should have fixed your problem, but for future debugging refrence, print is your friend.

When things don't work, start throwing print statements into your code. I woiuld have just printed "found it\n" when the conditional tested true. But you could have gone as far as to do something like..

sub wanted { print '.'; if ($_ eq "$item.dat")( print "\nfound it!\n"; found = $File::Find::name; } }
Which wold have shown you each iteration though \&wanted. I always find it easier to validate that the code is doing what I think it's doing when I'm getting unexpected results.

Hope this helps..
Rich