perl bayes