I have a script that opens a file using a normal file-handle, no problems with that. But, I'd like to generate the file in the script rather than having a physical file (I know it may sound stupid, but there are reasons for it). I tried to use $INC and __FILE__ to simulate a physical file: