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

No luck - it sleeps for 5 seconds an continue - if anything, it made the issue of timeout not being honoured even worse:

Before timeout: Tue Nov 8 04:14:40 2011 Timeout is: 500 Timeout! at getdbm.pl line 20. After timeout: Tue Nov 8 04:14:40 2011

Replies are listed 'Best First'.
Re^5: Net:SSH::Expect and microcom?
by salva (Canon) on Nov 08, 2011 at 12:52 UTC
    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 { ... }]);