in reply to code for serching .txt file through directories and sub directories
What do you expect -f $File::Find::name=~/.txt$/ to do?