you should construct each Expect object in the main thread and then spawn the subthread to handle it.
I've no idea if that will actually work, but it's worth a try.
In general, it's not a great idea to force perl threads on a problem unless you either know that it'll work, or you've got a very good reason to prefer threads over fork() AND you've got the time to fix various bugs like this (and worse).
In reply to Re^3: Problem With Net::SSH::Expect using Multi threads
by Joost
in thread Problem With Net::SSH::Expect using Multi threads
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |