http://qs1969.pair.com?node_id=1009726


in reply to perl one liner to search for a string, then search for a different string and append a new line

The cause that nothing is working is probably because you process the file line by line and the parts of the strings you are looking for are on different lines. You can slurp in the whole file by using the -0 command line switch with an octal value that does not represent an existing character, as per the docs.