|
So simple a perl question i'm almost embarrassed to ask. (Print text to TOP of file).
OK, to append it's something like:
$mystuff= $formdata{'mine'};
$inputstuff = $formdata{'inputtext'};
open (LOG, ">>stuff.txt") || &ErrorMessage;
and to wipe clean and overwrite it's
$mystuff= $formdata{'mine'};
$inputstuff = $formdata{'inputtext'};
open (LOG, ">stuff.txt") || &ErrorMessage;
but.... how do i make it so that input from a simple form goes to the TOP of my text file whilst keeping everything else that's there? Is there something simple to write instead? or does it involve harder work than it sounds? It seems as if it should be something I already know, but unfortunatly it's either too simple to document on the internet that i've searched so far or no one else ever needs to do this?? :S
Sarah.
|