You can't reliably push back data on file handles, nor can you reliably undo writes to file handles, nor can you take back accesses to tied data. That's where things get tough, and you don't need function calls involved, at least not explicitly--you just need to access some external resource or active data and hypothetical variables fall flat. Which is a shame, as it's a nifty idea.