in reply to Problem using File::Find

You don't show your entire code, so it's hard to tell what's wrong. Presumably, you've looked at the contents of @files and $item somehow. What do you mean that you can't get it to work? Does $found never get set?

Note that $File::Find::name is not the folder; it's the full file name.

Note also that you may have to set options to follow symbolic links, etc.

This entire program works for me:

#!/usr/bin/perl -w use strict; use File::Find; my @files=qw(. src); my $found; sub wanted { $found ||= $File::Find::name if $_ eq "xx.pl"; } find(\&wanted, @files); print "$found\n";