BEGIN { print "in BEGIN\n"; } sub foo { print "in sub foo\n"; } foo();