$obj->read(Blocking => 0); $obj->print($cliCommand); while (not $obj->prompt) { my $inc_output = $obj->read(Blocking => 0); if (defined $inc_output) { print $inc_output; $s1_output .= $inc_output; } sleep 1; } (process output in $s1_output)