in reply to Timing out ``?
Alternatively, you can put an explicit timeout on the ssh call: @list = `ssh machine -o ConnectTimeout=$timeout "ls path"`; However, in this scenario, you won't know if the connection timed out or not.
Side note: I don't think @list = `ssh machine "ls path"`; does what you think it does; maybe you mean @list = split /\n/, `ssh machine "ls path"`;?
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Timing out ``?
by mbethke (Hermit) on Jun 06, 2012 at 23:15 UTC | |
by kennethk (Abbot) on Jun 07, 2012 at 00:05 UTC | |
|
Re^2: Timing out ``?
by thomas895 (Deacon) on Jun 06, 2012 at 22:09 UTC | |
by kennethk (Abbot) on Jun 06, 2012 at 23:57 UTC | |
by slgilley (Initiate) on Jun 07, 2012 at 12:49 UTC |