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
In reply to Re: Passing args to a code ref?
by Zaxo
in thread Passing args to a code ref?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |