D
Dave
Hi,
I'm using Perl 5.10.1. I'm trying to fill in an HTML::Template, which
consists of
<TMPL_LOOP NAME=TESTS>
<tr><td><a href="<TMPL_VAR NAME=ABSOLUTE_PATH>"><TMPL_VAR
NAME=FILE_SHORT_NAME></a></td></tr>
</TMPL_LOOP>
but I'm getting an error when I try and do the following ...
my @loop_arr;
foreach (@test_files) {
my $test_file = $_;
my %params_hash;
$params_hash{'absolute_path'} = $test_file;
$params_hash{'file_short_name'} = $test_file;
push(@loop_arr, %params_hash);
}
# open the html template
my $template = HTML::Template->new(filename => '/opt/scripts/selenium/
report_suite.templ');
$template->param(TESTS => @loop_arr);
The error is complaining about the last line. I tried changing
"@loop_arr" to "$loop_arr" but that gave some undefined variable
errors. Could someone point out the error(s) of my ways?
Thanks, - Dave
I'm using Perl 5.10.1. I'm trying to fill in an HTML::Template, which
consists of
<TMPL_LOOP NAME=TESTS>
<tr><td><a href="<TMPL_VAR NAME=ABSOLUTE_PATH>"><TMPL_VAR
NAME=FILE_SHORT_NAME></a></td></tr>
</TMPL_LOOP>
but I'm getting an error when I try and do the following ...
my @loop_arr;
foreach (@test_files) {
my $test_file = $_;
my %params_hash;
$params_hash{'absolute_path'} = $test_file;
$params_hash{'file_short_name'} = $test_file;
push(@loop_arr, %params_hash);
}
# open the html template
my $template = HTML::Template->new(filename => '/opt/scripts/selenium/
report_suite.templ');
$template->param(TESTS => @loop_arr);
The error is complaining about the last line. I tried changing
"@loop_arr" to "$loop_arr" but that gave some undefined variable
errors. Could someone point out the error(s) of my ways?
Thanks, - Dave