in reply to Re: Re: Double quoted string as method call
in thread Double quoted string as method call

$obj->${"text_${_}"}();
I don't think that does what you want it to: it does one too many levels of indirection. if $_ has the value "foo", then I presume you want to do the equivalent of
$obj->text_foo()
In fact, supposing you have a variable called $text_foo with value bar, then what you are actually doing is the equivalent of
$obj->bar()

Replies are listed 'Best First'.
Re: Re: Re: Re: Double quoted string as method call
by ryantate (Friar) on May 05, 2004 at 00:07 UTC

    You're right -- this doesn't do what I thought. In fact, while it will compile, it doesn't actually work. :--(