faqts : Computers : Programming : Languages : Perl

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

4 of 16 people (25%) answered Yes
Recently 4 of 10 people (40%) answered Yes


How do I save form data from a textarea form element to a text (.txt) file? (flat file)

Dec 1st, 2004 09:17
Nat Tuck, marcy rye,

Does anyone ever read the docs before asking a question?
use warnings FATAL => 'all';
use strict;
use CGI qw(param);
open F, ">file.txt";
print F param('textarea-name');
close F;
print "Content-type: text/plain\r\n\r\n";
print "You win a text file";