http://www.perlmonks.org?node_id=493908


in reply to Doing "it" only once

Perhaps not what you're after, but there is an interesting discussion on something similar at A TRUE-once variable.