rings100's プログラミング
Perl,PHPなどのWeb系プログラミングのTipsです。
Friday, March 16, 2007
Perl Template::Toolkit の例
for ( my $key = 1; $key <= 10; $key++ ) {
push (@list, { pattern =>"pattern".$key, hoge=>$key, hoge2=>'hoge'} );
}
$self->stash->{list}= \@list;
-------
[% FOREACH r = list %] [% r.pattern html %] [% r.hoge html %] [% r.hoge2 html %] [% END %]
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment