Ok here is what I got..
use CGI;
$foo = new CGI;
$file = $foo->param('file'); # Gets what file to open...
$file =~ s/</& lt;/g;
$file =~ s/>/& gt;/g;
print "Content-type: text/html", "\n\n";
open(FILE,"$file");
@filecontents = <FILE>;
close(FILE);
print qq|
<HTML>
<body bgcolor="#000000" text="#FFFFFF" style="margin:0px">
<table border=0 height="100%" width="100%" cellpadding=0 cellspacing=0>
<tr valign=top>
<TD BGCOLOR="#D3d3d3" WIDTH="35%">
</td><td width="65%" align=center valign=middle>
<form name="save" ACTION="filesaved.cgi">
You are editing: <INPUT type=text name="file" value="$file" READONLY size=50>
<TEXTAREA NAME="newfile" COLS="55" ROWS=37>
|;
foreach $line(@filecontents) { print "$line"; }
print qq|
</TEXTAREA>
<INPUT TYPE=submit value="Save the File">
</form>
</td></tr></table>
</body>
</html>
|;
Now would I place that code that you gave me where I have it now, inside the open FILE, or inside the foreach loop that prints the html?
-------------
Jeremy
http://lc.crashinto.com - Crashinto Learning Central