But the print in your subroutine happens before the print of the heredoc and hence it shows up --as expected-- before the heredoc. You are not printing into the heredoc, but directly to your standard output device!
CountZero
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
My blog: Imperial DeltronicsIn reply to Re: Print statements inside a function call in a here-doc don't work
by CountZero
in thread Print statements inside a function call in a here-doc don't work
by MrSnrub
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |