in reply to File::Find problem

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)

Only those three combinations or also the many possible other ones like tESt_FilE_nAMe.DaT? (Even though they may not actually be there.) If the latter, than just use

lc $name eq 'test_file_name.dat'

as test.

Update: not directly related to your problem but also:

$datfile = uc(test_file_name.dat);
use strict; # and use warnings; # as well
open(FL, $File::Find::name);

Just the usual recommendations:

  1. use the three args form of open;
  2. use lexical filehandles;
  3. check the return value of opens.

Why are you opening it anyway? (Since you do not actually use it.)