BEGIN { eval "sub foo {}" if rand() < 0.5; } foo();