> How about:
> $template->param('keywords' => join ', ', @loop);
> 
> 
> Bill Moseley
> mailto:[EMAIL PROTECTED]

maybe i misled you in the previouse post let me be
more specify. suppose i have this in a perl script :
#################################
my @keywords = qw(key_1 key_2 key_3);
my @loop;
# wish could skip this foreach only do
#$template->param('keywords' => @keywords);
# it's one more hash and array !!
foreach (@keywords) {
        my %result;
        $result{'keyword'} = $_;
        push(@loop,\%result); 
}
$template->param('keywords' => \@loop);
print $template->output;

in a tmpl file :

<P>Your search for <b><TMPL_LOOP NAME="keywords">
<TMPL_VAR NAME="keyword"></tmpl_loop></b> found bla
bla..
##################################
I feel that i did too much codes just for printing the
elements in @keywords. Comparing to this 
print @keywords; # no HTML::Template at all....

maybe there are simple way to do it i.e get rid of the
foreach and hash ??

Qiang


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to