in reply to Re: Cleanup tools (auto HereDoc?)
in thread Cleanup tools (auto HereDoc?)
which works but is (I believe) a poor design. I'll play with your suggestion next. See my response to graff for why I can't jump right to template tags.my $line = 0; while (<>) { s/^([\smy]*\$\w+\s+\.?=\s+)['"](.*?)\\?n?['"];/$1<<END;\n$2/ unless $line > 0; s/^\s*\$\w+\s+\.=\s+['"](.*?)\\?n?['"];$/$1/g; s/\\"/"/g; $line++; print $_; } print "END\n";
|
|---|