in reply to Feeding data to external program

print $_ <<"EOJ" for *LOG, *EXTPROGRAM; foo $bar @baz EOJ
Note you should always quote your heredoc terminators.

Makeshifts last the longest.