If there's some sort of state information or some costly-to-compute digest that someone wants to preserve across different runs of their user-supplied perl code, and you're looking for a place to store that, well... Where is this user-supplied perl code really coming from? And assuming that it outputs something to the user who supplied it, where does that output go? Is it all keyboard/screen i/o at a console, or is there a network interface of some sort? Don't the users have some place to store and fetch their perl code, or do they have to type it in from scratch every time they use this facility?
If users are able to store their perl code somewhere, and have the ability to store the output from their code in the same place, then they'll want to structure their usage so that the output they want to keep/re-use can be attached as __DATA__ to the next bit of perl code they submit.
That's a lot of if's and assumptions and questions -- your post was awfully vague.