$ cat pm_1223868_heredoc_awk.pl #!/usr/bin/env perl use strict; use warnings; print <<`EOS`; echo "a b c" | awk '{print \$2}' EOS