use strict;
use warnings;
sub test_a;
sub test_a { my $arg = shift; ref($arg) ? test_a$$arg[0] : $arg }
sub test_b { my $arg = shift; ref($arg) ? test_a$$arg[0] : $arg }
print test_b[42]; # prints '42'
print test_a[42]; # prints '42'
####
test_a($$arg[0])
####
${ $arg }->test_a([0])