Try
my $res = new Some::Package({ foo => bar })->$sub;Or better:
my $res = Some::Package->new({ foo => bar })->$sub;
In reply to Re: Calling subroutine with a scalar
by philipbailey
in thread Calling subroutine with a scalar
by Rodster001
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |