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.
In reply to Re: Timing out ``?
by kennethk
in thread Timing out ``?
by slgilley
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |