in reply to Re: Dynamically constructed function calls
in thread Dynamically constructed function calls
It has to be a scalar, but it doesn't need to be a variable. You can say
However, using a variable is probably clearer.$f->${\("prefix_$key")}($atr);
Update: added the missing '$' pointed out by ikegami
--Dave
Opinions my own; statements of fact may be in error.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Dynamically constructed function calls
by ysth (Canon) on Nov 04, 2004 at 02:07 UTC | |
by dragonchild (Archbishop) on Nov 04, 2004 at 04:03 UTC | |
by ikegami (Patriarch) on Nov 04, 2004 at 04:48 UTC | |
by ysth (Canon) on Nov 04, 2004 at 05:36 UTC | |
by ikegami (Patriarch) on Nov 04, 2004 at 15:56 UTC | |
Re^3: Dynamically constructed function calls
by ikegami (Patriarch) on Nov 04, 2004 at 04:37 UTC | |
Re^3: Dynamically constructed function calls
by itub (Priest) on Nov 04, 2004 at 01:54 UTC |
In Section
Seekers of Perl Wisdom