in reply to method invocation syntax at perl
Yes, it can be done, but I wouldn't recommend it:
For instance:$obj->${\EXPR}(ARGS)
use strict; sub foo { "@_" } my ($x, $y) = qw/ f oo /; print __PACKAGE__->${\($x . $y)}('FOO'); __END__ main FOO
lodin
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: method invocation syntax at perl
by braveghost (Acolyte) on Jan 03, 2008 at 13:21 UTC | |
by Fletch (Bishop) on Jan 03, 2008 at 14:34 UTC | |
by braveghost (Acolyte) on Jan 03, 2008 at 14:50 UTC |