generating random percentage

Summer <crazysummer2004-/[email protected]> Wed, 2 Apr 2014 12:20:38 -0700 (PDT)
Newsgroups gmane.comp.lang.perl.modules.template-toolkit
Message-ID <[email protected]>
Hello,

Given a percentage, lets say 5 -- is there a way in template toolkit to generate a random number from 0 - 100. I want to compare this "random" number to be equal or less than the percentage i have. In this case, is 5. Could be 20 etc... doesn't matter. I am really looking for a way to generate a random number, whole, from 0 - 100. I look thru the docs, don't see anything.

Thanks

_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates