Well, I see code for call_cmd which seems to be trying to run a command locally and collect the output -- but it isn't called anywhere; I see a main body that runs through an array, creating threads incorrectly (you have a call to the thread creation routine where you should have a coderef); and finally, you call ssh_con from thread_creation, but it isn't defined anywhere.
I'd recommend appending a complete script that exhibits the incorrect behaviour (don't delete the existing material), and of course remember to use strict and use warnings.
Alex / talexb / Toronto
Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.