perl -wle'sub new { bless $_[1] } sub foo { print "foo!" } main->new(\my @x); (\@x)->foo()'