$switch = chr(int(rand(3)+97)); $switch->(); sub a {print "one\n";} sub b {print "two\n";} sub c {print "three\n";}