in reply to How to update package scoped variables across files?
You are asking for some means of storing state. Typically this could be achieved by tying the hash to a file. There are many, many modules to help with this.