my @directory = ("C:\Testing"); my $srcfile; my @sourcefiles; $datfile = uc(test_file_name.dat); find(\&sourcefind, @directory); sub sourcefind { open(FL, $File::Find::name); $sourcefile = $_ if -f and /$datfile/ ; close(FL); } the program has to find successful match if the filename is following Case 1 : test_file_name.dat (all lower case) Case 2 : TEST_FILE_NAME.DAT (all upper case) Case 3 : Test_File_Name.dat (Mixed)