foreach my $current_port ( @{$INPUT_DATA{$device_name}} ) { my @CURRENT_PORT_STATUS = $session->cmd( "show xdsl operational\-data line $current_port detail" ); }