CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner:
A Little bit of help on editing files



Oct 20, 2001, 11:23 AM

Post #1 of 2 (920 views)
A Little bit of help on editing files Can't Post

How would i be able to open up a file, print out its HTML into a textbox, be able to edit it, and then save it?

Anyhelp is appreciated


Oct 21, 2001, 8:57 AM

Post #2 of 2 (910 views)
Re: A Little bit of help on editing files [In reply to] Can't Post

well, open the file like you would normally, and set the contents of the file to an array

open (FILE, "/path/to/file");
close FILE;

then print it in a text box

print qq(<textarea rows="2" name="modded" cols="20">@contents</textarea>);

then when the user submits it, do something like this

open(FILE, ">path/to/file");
print FILE @mod_contents;
close FILE;

keep in mind that you are going to have to set up a variable to take the contents of the text area.

if you need more clarification, email me


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives