Perl Basics In Pictures
Basics
Variables
Numbers
Subroutines
Logic & Loops
Files
Open
textwriter.pl
and replace this code:
open(MYFILE,">$myfile");
print MYFILE "$mycomments";
close(MYFILE);
print "<p>The $myfile file is created with the following thought:</p>";
print "<p>$mycomments</p>";
print "<p>$myfile</p>";
print "<a href=\"http://www.yourwebsite.com/textwriter.html\">Enter a new thought</a><br>\n";
print "<a href=\"$myfile\">View the $myfile text file</a>\n";
with this code:
open(MYFILE,">>$myfile");
print MYFILE "$mycomments";
close(MYFILE);
print "<br>The $myfile file is updated with the following text: <p>$mycomments</p>";
<< BACK
NEXT >>