
AsiaSkyly
Novice
May 4, 2012, 5:02 PM
Post #1 of 3
(11277 views)
|
Net::SCP::Expect and timeout
|
Can't Post
|
|
I am having a problem where the timeout on Expect appears to work as a delay rather than a timeout. Is there a way to make the timeout expire if the pattern is matched? my $scpe = Net::SCP::Expect->new( host=>$host, user=>$user, password=>$password, timeout=>15, preserve=> 1, auto_yes => 1 ); For some reason the speed of my connection is controled by the timeout. Timeout of 1 is quicker, but of course, then you run the problem that it might indeed timeout too soon. I want to use a long timeout but quit as soon as the pattern match is made.
|