Fundamentally you would leverage Perl variables. There is a module that looks like it might be what you want,
. I had to look up what a memory mapped file was and I realized it's pretty much what we do when we slurp a file into a datastructure. I know that doesn't really mean we use file accessor primitives, but things in Perl are done on a higher level via data structure manipulation. (update) somewhat related,