|
TEXTAREA from html and saving it intoa file!
Hello!
I have made an editor that allows to edit userlist. You can edit the userlist by the following TEXTAREA tag on the HTML code:
print <<End_of_line;
<form method="POST" action="save_userlist.pl">
<table width="690">
<tr>
<td>
End_of_line
foreach $line (@array){
($id,$name)=split(/\|/,$line);
$readout .= "$line";
}
print <<End_of_Doc;
<textarea name="filetext" wrap="off" rows="30" cols="110">$readout</textarea>
</td>
</tr>
</table>
</form>
End_of_Doc;
When I edit this and save it, there might be blank lines left after the last entry, which the shows up on a script that loads the content of the file and prints it out.
How can I save the file without the blank lines after the last entry?
|