$ssh->waitfor('COR>',2) or die "Where is prompt"; my $line; while ( defined ($line = $ssh->read_all()) ) { $ssh->send("\x1D"); print $line . "\n"; }