You need to create a new PPI::Document object for each here-doc. I say that because I tried calling two here-docs, but PPI would
only give me one. Also, I couldn't replicate your output. How did you replace 'Something' with 'else'? I would modify the docs like this: