Gossamer Forum
Home : General : Perl Programming :

please help...

Quote Reply
please help...
Hi,
I'm working on an admin section for a program I'm helping to write. There is a form that the administrator fills out that configures the program. I want the results of the form to be written to a file (e.g.: $hometeam="canucks" $awayteam="coyotes", etc. etc. etc.). I need it so that every time the admin changes something, the file is rewritten. I know it shouldn't be that hard to do, but I can't figure it out. Help would be greatly appreciated.

Thanks.

Quote Reply
Re: please help... In reply to
$file = "myfile.txt";
$hometeam = $FORM{hometeam};
$awayteam = $FORM{awayteam};
open(FILE,">$file") || die "Cant open $file:$!";
print FILE "$hometeam";
print FILE "$awayteam";
close(FILE);

Paul Wilson. Shocked
(Dont blame me if I'm wrong!)