Voting

Category

real language

Bookmarking

Del.icio.us Digg Diigo DZone Earthlink Google Kick.ie
Windows Live LookLater Ma.gnolia Reddit Rojo StumbleUpon Technorati

Language Template Toolkit

Date:04/20/05
Author:David Mullen
URL:n/a
Comments:1
Info:http://www.template-toolkit.org/
Score: (3.00 in 6 votes)
[% # 99 beers for the Template Toolkit (http://www.template-toolkit.org/)
   # Author: David Mullen -%]

[%- BLOCK bottles -%]
[% beers or 'No' %] bottle[% beers == 1 ? '' : 's' %] of beer
[%- END -%]

[%- beers = 99; WHILE beers > 0 %]
<p>[% PROCESS bottles %] on the wall,<br />
[% PROCESS bottles %],<br />
You take one down, pass it around,<br />
[% beers = beers - 1; PROCESS bottles %] on the wall.</p>
[% END %]

Download Source | Write Comment

Alternative Versions

Comments

>>  Frank said on 06/16/05 21:58:21

Frank nice but where is the perl code that is supposed to be calling this or are we using a tt command line?

Frank

Download Source | Write Comment

Add Comment

Please provide a value for the fields Name, Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.

Please don't post large portions of code here! Use the form to submit new examples or updates instead!

Name:

eMail:

URL:

Security Code:
  
Comment: