if($change_count) { open(OUT,">c:\\h\\CSSCS\\bin\\scripts\\ListofFile.txt") || "Can't open file for writing:$!\n"; print OUT @lines; close OUT; }