in reply to HTML::Template frustrated...

You are calling $template->param() multiple times within the perl loops, which will overwrite any previous settings. And you are calling $template->param(SCHEDULE_ROWS ...) inside an if block, so if that test returns false it won't be called at all - hence the error.

Here is a trimmed down version to show the logic required:

for my $customer (keys %$bi) { for my $domain (keys %{$bi->{$customer}}) { my %customer_domain_data; my @schedule_rows_loop; for my $host (keys %{$bi->{$customer}->{$domain}}) { if (defined $schedule) { for my $dif_schedule(@schedule) { push (@schedule_rows_loop, \%schedule_rows_data); } } } $customer_domain_data{SCHEDULE_ROWS} = \@schedule_rows_loop; push (@customer_domain_loop, \%customer_domain_data); } } $template->param(CUSTOMER_DOMAIN => \@customer_domain_loop);

Replies are listed 'Best First'.
Re^2: HTML::Template frustrated...
by iRemix94 (Sexton) on Jul 15, 2015 at 06:11 UTC

    thank you! This works exactly like I wanted to :) This is the part which helped me a lot:

    $customer_domain_data{SCHEDULE_ROWS} = \@schedule_rows_loop; push (@customer_domain_loop, \%customer_domain_data);