use Win32::ChangeNotify; print " \n Enter a file path "; $pt = ; chomp $pt; $notify = Win32::ChangeNotify->new($pt, true ,"SIZE"); $cnt = 0; while(1) { $cnt++; if ($cnt > 1) { print " \n File copy is going on "; $notify->reset; } $lmt--; next if ($notify->wait(10000)); print " \n The counter value is $cnt \n "; last; } print " \n hello world "; $notify->Close();