Click to See Complete Forum and Search --> : create new file


shmak
08-01-2003, 04:49 AM
how 2 create new file using perl in cgi?

Charles
08-01-2003, 05:06 AM
See http://www.perldoc.com/perl5.8.0/pod/perlopentut.html.

goofball
08-01-2003, 12:30 PM
open(FILE,">../path_to_file.txt");
print FILE "this text is the first line in the file.\n";
print FILE "more print statements...\n";
close(FILE);


I have to recommend a book: "Sam's Teach Yourself Perl in 21 Days"
That's what got me started, and I still use it for reference every now and again.

Charles
08-01-2003, 12:34 PM
Originally posted by goofball

open(FILE,">../path_to_file.txt");
print FILE "this text is the first line in the file.\n";
print FILE "more print statements...\n";
close(FILE);
That omits not a few important parts. Parts that are covered by the turorial the link to whick I have posted above.

goofball
08-01-2003, 12:39 PM
Charles:
You have a point. But simple questions sometimes need simple answers. Like you, I'm just trying to help out.