in reply to Working on Deleting Sections of Text File Delimited by Newlines

I prefer writing out my HTML over using CGI.pm to write it -- primarily because when I'm not using templates, I often copy/paste from Dreamweaver (my favorite WYSIWYG HTML editor).

But, I use the lovely qq() tag so I can format my code nicely. I'm anal when it comes to my code. :)
print qq( <TR> <TD valign="top">Delete This Post? <input type="checkbox" name="box$ +post_number" value="onepost"></TD> <TD> <table width="295"> <TR> <TD>$_</TD> </TR> </TABLE> </TD> </TR> <TR bgcolor="#000066"> <TD colspan="2">&nbsp;</TD> </TR> );
As for your question, I'd think about delimiting your records differently to make it easier to know which record you want to delete. I'd use HTML comments.
<!MESSAGE 1006873233> This is my message. There are many like it, but this one is mine. <!/MESSAGE 1006873233>
You could certainly expand those comments out to the more standard format: <!-- MESSAGE 1006873233 -->. But, I intentionally wrote it the other way because that's how I use it.. and I was hoping someone might see that and say "HEY, STUPID! That's really bad because..." Then I can waste a day and go run Perl code to change all 30000+ of these comments on my site.