Troy May wrote at Thu, 13 Jun 2002 04:51:34 +0200: > Hello, > > I'm trying to do a news feed type of script from an admin page. I need to open up a >page and find > the line that starts with "<!--news feed-->" and insert "$html" right after that. >I'm drawing a > blank on how to search for that line. This is probably easy, but I can't think of >how to do it. >
Let's assume $text contains the page. Then $text =~ s/(<!--news feed-->[^\n]*\n)/$1$html/s; should make the insert. Best Wishes, Janek -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]