|Think about Loose Coupling|
Re^2: Indented HEREDOC?by reasonablekeith (Deacon)
|on May 26, 2006 at 08:41 UTC||Need Help??|
sorry for the nit-pick, but given the OP's example showed a variable, the example really should have been.
With the difference being that I've used double quotes and not single quotes. I mention it becuase I missed this the first time I saw heredocs, and didn't realise it caused the entire contents of the heredoc to be either interpolated or not, dependant on whether you used double or single quotes, respectively.
The output of the above would obviously be
foo is whatever_is_in_foo
as opposed to single quotes, which would give
foo is $foo
my name's not Keith, and I'm not reasonable.