in reply to I don't want to search subfolders

Just do not use File::Find try glob's or opendir, readdir and closedir.
Boris