$obj->read(Blocking => 0); $obj->print($cliCommand); $output = $obj->waitfor($obj->prompt);