in reply to simple template ?
use Template; my ($n1, $n2) = @ARGV; Template->new->process(\*DATA, { n1 => $n1, n2 => $n2 }) or die Templa +te->error; __END__ [% FOR i1 = [1 .. n1] -%] Section [% i1 %] [% FOR i2 = [1 .. n2] -%] Subsection [% i2 %] [% END -%] [% END -%]
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: simple template ?
by vnpenguin (Beadle) on Sep 10, 2006 at 19:19 UTC |