in reply to Passing args to a code ref?
my $foo = 192; my @things = sub {$some_other_object->my_method(@_)}->($foo);
You're flirting with a closure on $some_other_object: why not just call directly?
my @things = $some_other_object->my_method($foo);
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Passing args to a code ref?
by Anonymous Monk on Sep 13, 2005 at 21:30 UTC |