diff --git a/bin/ngcp-create_subscriber b/bin/ngcp-create_subscriber index 6abd39e..4071cb8 100755 --- a/bin/ngcp-create_subscriber +++ b/bin/ngcp-create_subscriber @@ -65,7 +65,7 @@ sub main { if ($dom->as_hash->{total_count} == 1) { my $tmp = $dom->as_hash->{_embedded}->{'ngcp:domains'}; if (ref $tmp eq 'ARRAY') { - $data{domain_id} = $tmp[0]->{id}; + $data{domain_id} = @{$tmp}[0]->{id}; } else { $data{domain_id} = $tmp->{id}; } diff --git a/bin/ngcp-delete_domain b/bin/ngcp-delete_domain index bf3fcd7..7c92bd3 100755 --- a/bin/ngcp-delete_domain +++ b/bin/ngcp-delete_domain @@ -59,7 +59,7 @@ sub main { if ($dom->as_hash->{total_count} == 1) { my $tmp = $dom->as_hash->{_embedded}->{'ngcp:domains'}; if (ref $tmp eq 'ARRAY') { - $dom_id = $tmp[0]->{id}; + $dom_id = @{$tmp}[0]->{id}; } else { $dom_id = $tmp->{id}; } diff --git a/bin/ngcp-terminate_subscriber b/bin/ngcp-terminate_subscriber index e3d3b4b..fcb59d3 100755 --- a/bin/ngcp-terminate_subscriber +++ b/bin/ngcp-terminate_subscriber @@ -54,7 +54,7 @@ sub main { if ($sub->as_hash->{total_count} == 1) { my $tmp = $sub->as_hash->{_embedded}->{'ngcp:subscribers'}; if (ref $tmp eq 'ARRAY') { - $sub_id = $tmp[0]->{id}; + $sub_id = @{$tmp}[0]->{id}; } else { $sub_id = $tmp->{id}; }