in reply to use of string terminator within a subroutine

In such cases, I just use a terminator with leading whitespace:
sub greet { my $who = shift; print <<" EOT"; Hello, $who EOT }