in reply to Re^4: Net:SSH::Expect and microcom?
in thread Net:SSH::Expect and microcom?

opps, you have to use the m switch on the regular expressions in order to make ^ and $ match at the beginning and end of lines:
$exp->expect($timeout, [qr/^OK$/m => sub { ... }], [qr/^ERROR$/m => sub { ... }]);