Thanks for reply! I already got this working pretty much the same way you suggested maybe just a line of code less [img]/infopop/emoticons/icon_smile.gif[/img]
$myline = 100; # the line I want to edit
$mynewline = "Hello I am a new line that has been replaced.";
open( DATA, "data.txt" );
@data = < DATA >; # Get data
close( DATA );
$data[$myline]=$mynewline; # Make the change
open( DATA, ">data.txt" );
print DATA @data; # Write the data file to disk
It's the same I'm just not re-writting the file line by line. (Note that print DATA @data; must be used, not print data "@data"; since this second one ads spaces to the beginning of every new line)
VB programmers? Sorry, can't think of anyone ...
## UBB = !%#)&$=)"%/!"#&#=?*"!*)=*)#¨!"
[ 08-22-2002: Message edited by: c4 ]