[sf-perl] Constant in here doc?
David Fetter
david at fetter.org
Thu Jun 9 14:02:35 PDT 2005
On Thu, Jun 09, 2005 at 01:59:03PM -0700, David Alban wrote:
> Greetings,
>
> How does one use a constant in a here doc?
>
> use constant FOO => 42;
>
> my $heredoc <<"EndOfHereDoc";
> FOO
> EndOfHereDoc
>
> print $heredoc;
You wanted @{[FOO]}
Cheers,
D
--
David Fetter david at fetter.org http://fetter.org/
phone: +1 510 893 6100 mobile: +1 415 235 3778
Remember to vote!
More information about the SanFrancisco-pm
mailing list