javascript: not possible. on tricky netscape configs you can write files, but yeah, not possible.
cgi:
open (HANDLENAME, "filename");
print HANDLENAME "stuff to write";
$nextline = <INPUT>;
seek works like its qb counterpart
read works like get
tell works like seek used as a function in qb.
now, when you open it, the filename indicated the mode. there are a bunch of read write combinations (
http://www.perldoc.com/perl5.8.0/pod/perlopentut.html ), but you only really need 3:
open (HANDLENAME, "filename"); #read
open (HANDLENAME, ">filename"); #write
open (HANDLENAME, ">>filename"); #append
look up the functions in the perl documentation. as perl.qb45.com is down, i'll send you to
http://www.perldoc.com/
edit: i fixed a brainfart on my part.
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry