hello,<br><br>I am just new to perl and would apreciate an answer to a simple question.<br>How do I add text to a file<br><br>for exemple :<br>1) I check the status <br>2) The status is
Hmmm - did some of you post get cut off there?<br><br>In response to your question, it all depends on where you want to the text to be entered, and how much text you have to enter. I guess this info was in the missing text from you post. Any chance you could post again? Thanks.
<br> To append to a file;<br><br>open(FILE, ">>/path/to/file.db"<br>print FILE "Im writing to a file";<br>close(FILE);<br><br> To write to an existing file and to destroy it's contents or create a new file use the same code as above but change the >> to ><br><br>perlkid
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.