The quotes around 'TEST' are matching the quotes around the one liner. The shell is passing
to perl. The contents of the heredoc are then being interpolated. There are also some funky dealing with the multi-line stuff you will need to work through.package test;$text <<TEST;test@heredoc;\r\nTEST;print "$text\n"
(Update) Perhaps:
perl -e 'package test;$text=q(test@heredoc);print "$text\n"'
--MidLifeXis
In reply to Re: Heredoc in one-liner?
by MidLifeXis
in thread Heredoc in one-liner?
by loris
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |