in reply to Control:CLI or Net::SSH2 - Send <ctrl>_

Monks, I am forever indebted! Through your feedback, talking to some folks, and some experimentation... it now works as expected!

So it turns out you MUST push enter before sending Ctrl_. So I coded that as a "put("\n")" (print and cmd instead of put returned a bunch of gobbledygook, put comes back clean). Glory be, the combo of that and your suggestions worked! Here is the final relevant chunk of code:

if (defined($port)) { my $exit = ""; print " Connected To Switch $switch!\n"; $output = $obj->put("\n"); my $switchexit = $obj->put("\037"); sleep 2; $output = $obj->put("D"); } else { print " Not Connected To Switch $switch...\n"; } }