$ssh->exec("microcom /tmp/dev/mux1"); $ssh->send("AT+CSQ"); $ssh->waitfor('^\+CSQ', 3) or warn "No output!"; $myOutput = $ssh->match(); print "CSQ result: $myOutput";