* Perrin Harkins <[EMAIL PROTECTED]> [02-08-26 10:18]: > Joe Johnston wrote: > > I'm using Template Toolkit 2.08 (very cool system) and > > I'd like to count the occurrences of a pattern in a string. > > In Perl, I can do this a number of ways > > Then why don't you use perl? Calculate the answer in perl before you > run the template, or make a plugin (or just pass a ref to a subroutine) > that does what you want. TT is not meant to replace perl.
Yes, that had occurred to me. However, this doesn't seem to merit a whole module. Also, I want to get Perl out of the TT pages (otherwise I could have just used HTML::Mason ;-) Since there already is match operator in TT, it seems like a global match op won't be unduly complicated. I was hoping something like this was already in the TT language. -- ---------------- Joe Johnston -- http://taskboy.com Software Consultant: Web - Database - Perl _______________________________________________ templates mailing list [EMAIL PROTECTED] http://www.template-toolkit.org/mailman/listinfo/templates
