Re: generating random percentage
Summer <crazysummer2004-/[email protected]> Wed, 2 Apr 2014 12:48:38 -0700 (PDT)
| Newsgroups | gmane.comp.lang.perl.modules.template-toolkit |
|---|---|
| Message-ID | <[email protected]> |
yeah - here is the problem, I should have mentioned it. I don't have access to the Math plugin.. arggh. Any other way? I only have access to format and number_format -j On Wednesday, April 2, 2014 12:29 PM, Sean McAfee <[email protected]> wrote: On Wed, Apr 2, 2014 at 12:20 PM, Summer <crazysummer2004-/[email protected]> wrote: 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. > > You want the Math module. This template snippet will output a whole number between 0 to 99 inclusive: [% USE Math; Math.int(Math.rand(100)) %] _______________________________________________ templates mailing list [email protected] http://mail.template-toolkit.org/mailman/listinfo/templates _______________________________________________ templates mailing list [email protected] http://mail.template-toolkit.org/mailman/listinfo/templates