On Jul 2, 9:27 am, [EMAIL PROTECTED] (Rob Dixon) wrote:
> Gabriel Striewe wrote:
> > What do I do wrong?
>
> First of all, the ampersand subroutine designation is outdated and dangerous
> and it is far better to use the indirect notation for a subroutine call:
>
> $hello->()
>
> Perl will interpola
You may want to have a look at Interpolation.pm from CPAN.
Jenda
== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==
: What do people think?
What, do people think? :-)
-- Larry Wall in <[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail
Gabriel Striewe wrote:
I wanted to interpolate a function reference in a here doc.
The following works fine:
my $hello = sub {
return "hello world!";
};
printf "hello $s\n", &$hello();
But when I use a heredoc instead, it doesn't work:
print <
First of all,
On Jul 2, 2007, at 2:46 PM, Gabriel Striewe wrote:
Dear List,
I wanted to interpolate a function reference in a here doc.
The following works fine:
my $hello = sub {
return "hello world!";
};
printf "hello $s\n", &$hello();
In Perl printf is rarely used beca
On 7/2/07, Gabriel Striewe <[EMAIL PROTECTED]> wrote:
Dear List,
I wanted to interpolate a function reference in a here doc.
The following works fine:
my $hello = sub {
return "hello world!";
};
printf "hello $s\n", &$hello();
But when I use a heredoc instead,