View Single Post
Old 07-16-2002, 01:21 PM   PM User | #1
sarah_anne
Registered User

 
Join Date: Jun 2002
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
sarah_anne is an unknown quantity at this point
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.
sarah_anne is offline   Reply With Quote