in reply to
Problem with PPI HereDoc's
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:
#!/usr/bin/perl
use strict;
use warnings;
use PPI;
use PPI::Dumper;
my $data;
($data = <<'ENDOFSQL') =~ s/Something/else/;
Something
ENDOFSQL
my($Document) = PPI::Document->new(\$data);
my $Dumper = PPI::Dumper->new($Document);
$Dumper->print;