for (my $i=0; $pFuncsA[$i]->{command}; $i++) { ... #### for (keys %channels) {