Thread HTML::Template & Referenzen / Hash (3 answers)
Opened by Gast at 2007-10-30 10:51

pq
 2007-10-30 11:29
#101556 #101556
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
$ perl -wle'
use HTML::Template::Compiled;
my $htc = HTML::Template::Compiled->new(
plugin => [qw(::HTML_Tags)],
scalarref => \"<%html_option switch_ips %>",
);
$htc->param(
switch_ips => [undef, "127.0.0.1", "127.0.0.2", "127.0.0.3", "127.0.0.4"]
);
print $htc->output'
<option value="127.0.0.1" >127.0.0.1</option>
<option value="127.0.0.2" >127.0.0.2</option>
<option value="127.0.0.3" >127.0.0.3</option>
<option value="127.0.0.4" >127.0.0.4</option>
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem

View full thread HTML::Template & Referenzen / Hash