srins has asked for the wisdom of the Perl Monks concerning the following question:
my @add=( { name=>"Submode", value=>[ 'Ford Prefect', 'Slartibartfast' ], } ); i pass this array of to template by my %data = ( add => \@add ); my $template = Template->new({ }); $template->process(temp.tmpl, \%data) || die $template->error();
[% FOREACH element = add %] <textarea rows="4" name="[%element.name %]" > [% FOREACH option = element.value %] [% option %] [%END%] </textarea> [%END%]
"% option.chomp % and also % option.trim %"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to chomp or trim extra characters like \n ,white spaces in text area using template toolkit
by Fang (Pilgrim) on Nov 24, 2005 at 09:15 UTC | |
|
Re: how to chomp or trim extra characters like \n ,white spaces in text area using template toolkit
by holli (Abbot) on Nov 24, 2005 at 17:02 UTC | |
by Anonymous Monk on Nov 24, 2005 at 21:15 UTC | |
|
Re: how to chomp or trim extra characters like \n ,white spaces in text area using template toolkit
by EvanCarroll (Chaplain) on Nov 24, 2005 at 09:16 UTC |