in reply to CGI data from memory w/o mod_perl
It's not a bad idea, but it's certainly more complicated than it needs to be, and you have to deal with the added complexity of a socket.
If what you're looking for is faster disk access (and it sounds like you are), setup a in-memory filesystem (for example, on a Solaris box, /tmp is usually just RAM, and files written to it are really being written straight to memory). Essentially, it's a poor man's memory cache, but it will make your file access a LOT faster, and you don't have to change anything except the path location. The OS will manage moving things out of memory and into swap as it needs to.
In Section
Seekers of Perl Wisdom