in reply to file$name.class find - regexp ?

Please read perlre to learn how to escape strings. You will likely want to use quotemeta respectively the \Q...\E string escapes to escape regex-special characters from your search string:

use strict; use File::Find; $file = 'test$file.class'; # note that you need to use single quotes h +ere find( sub { /\Q$file\E/ && print "$File::Find::name\n", $destDir });