On Thu, Aug 26, 2010 at 8:10 AM, Josh803316 <[email protected]> wrote: > Is there a random number generator I have access to inside of the template?
Check out the Math plugin: Template::Plugin::Math [% USE Math %] [% Math.int((Math.rand() * 120 ) + 2) %] You have access to srand as well, so you should probably call that with a suitable value first. If you need truly random numbers, then also install Math::TrulyRandom which will then offer you Math.truly_random_number from within your templates. Cheers, Cees Hek _______________________________________________ templates mailing list [email protected] http://mail.template-toolkit.org/mailman/listinfo/templates
