Sscotties
08-22-2002, 12:20 PM
Sorry to be a pain, but I am trying to get to grips with this stuff and I am attempting to learn cgi/perl, forgive me for using this as a short-cut. What I want is something similar to this that appends the file rather than rewrites over it, so that each time it is accessed only the most recent submission is added in a new line of user input to the "results.txt" file.
#!/usr/bin/perl
open(OUT, ">/my_info/results.txt");
print "content-type: text/plain\n\n";
while (<>) {
print OUT $_;
print $_;
}
close (OUT);
exit 0;
#!/usr/bin/perl
open(OUT, ">/my_info/results.txt");
print "content-type: text/plain\n\n";
while (<>) {
print OUT $_;
print $_;
}
close (OUT);
exit 0;