in reply to Is it possible to "use vars" or "our" a file handle?

For a name you use once, you can use a symbol starting with an underscore, which suppresses the used once warning. This works in your case as well. Eg. open _MESSAGES, ">", "msg.txt" or die;