http://qs1969.pair.com?node_id=282969


in reply to Updating a text file

Kirk, I *think* what you're trying to do is not rewrite the file unless it changed. If that's the case, then instead of your "next" line, do
if($change_count) { open(OUT,">c:\\h\\CSSCS\\bin\\scripts\\ListofFile.txt") || "Can't op +en file for writing:$!\n"; print OUT @lines; close OUT; }