in reply to trying to find <head> in a string
s/<head>/<head>\n$your_string/; [download]
-- Randal L. Schwartz, Perl hacker Be sure to read my standard disclaimer if this is a reply.