Re: interpolation of function reference in a here doc

2007-07-05 Thread Brad Baxter
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

Re: interpolation of function reference in a here doc

2007-07-03 Thread jenda
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

interpolation of function reference in a here doc

2007-07-02 Thread Gabriel Striewe
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, it doesn't work: print

Re: interpolation of function reference in a here doc

2007-07-02 Thread Rob Dixon
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,

Re: interpolation of function reference in a here doc

2007-07-02 Thread Xavier Noria
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

Re: interpolation of function reference in a here doc

2007-07-02 Thread Adriano Ferreira
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,