sub foo { print 'bar' } $var = 'foo'; main->$var;