in reply to Re: Indented HEREDOC?
in thread Indented HEREDOC?
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.if ($foo) { print <<" STRING"; foo is $foo. STRING }
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Indented HEREDOC?
by Ovid (Cardinal) on May 26, 2006 at 23:27 UTC |