diff --git a/sbin/ngcp-network b/sbin/ngcp-network index 8a11a7c1..568b5772 100755 --- a/sbin/ngcp-network +++ b/sbin/ngcp-network @@ -370,7 +370,7 @@ sub set_dbnode { my $new_dbnode = shift; my @nodes = ( 0, ); - foreach my $h (keys $yaml->[0]->{hosts}) { + foreach my $h (keys %{ $yaml->[0]->{hosts} }) { if($h ne $host && defined $yaml->[0]->{hosts}->{$h}->{dbnode}) { push @nodes, $yaml->[0]->{hosts}->{$h}->{dbnode}; }