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


in reply to Re: opened file being overwritten
in thread opened file being overwritten

That is just so wrong. FILE1...FILE4 are globals, meaning they won't be closed when the sub exits.