APLTemplate error code1 (Bizarre copy of ARRAY in list assignment at /usr/share/perl/5.22/Carp.pm line 228. )

my %data2 = (); my $t = ''; $temp::select_tech = 1; my @a = (); my ($code2, $sth3); $code2 = " select * from $variables::language_current"."_names_tech where public = 1 order by order_value DESC "; $sth3 = SQL::MySqlLayer->query( $object::sql, $code2 ); if ( !defined $sth3 || SQL::MySqlLayer->get_affected_rows($sth3) < 1 ) { } else { for ($i=0; $i<=SQL::MySqlLayer->get_affected_rows($sth3); $i++ ) { %data2 = SQL::MySqlLayer->get_hash( $sth3 ); if ( defined %data2 && defined $data2{'name'} && length $data2{'name'} ) { my $sel = ''; if ( defined $object::cgi->param('pf') && $object::cgi->param('pf') eq 'tech' && defined $object::cgi->param('tech') && $object::cgi->param('tech') > 0 ) { if ( $object::cgi->param('tech') == $data2{'id'} ) { $sel = ' selected="selected"'; } } if ( $data2{'id'} != 13 ) { push @a, ''; } else { $t = ''; } } } } unshift @a, $t; $temp::sel = join '', @a;