perl -wle'sub foo { print "foo!" } use Tie::Array; @ISA="Tie::StdArray"; tie @x, "main"; tied(@x)->foo()'