Anyway, to answer your question you can code the php script the ajax function calls to open, read, edit, save text files using the php file handling functions. They're all documented in the online php manual.
Weird that they would completely disabled cgi's ... Have you tried uploading a "standard" cgi script? ... You know, one of those archaic things that actually has to specify the executable needs to parse it?
I can read/write/execute (perl, html, JS) on my personal space.
If I'm understanding you correctly, this is all you need to be able to do. As long as your system's copy of perl is located in the traditional /usr/bin/perl path, the Hello World (wull hullo) script I supplied should be a suitable test.
Drop it into the your web docs directory (preferably the cgi-bin folder, if it exists), chmod it to 755, and try to hit it in a web browser. If it displays "wull hullo" on the screen, you should be able to accomplish what you need. (Though I would advise against using perl scripts for AJAX -- or at all, if you can avoid it.)