Look at Net::SSH::Perl closely. You may need to look at the code.
It's been awhile since I've worked with this module so I'm afraid I can't give you anything specific. But as I recall, this module has a different concept of a command failing than you might be expecting. Much of what you would consider an error is actually returned as a warning if at all. Kind of like the SQL "zero rows returned" debate of whether that is an error, success or warning sort of thing.
Since the module can't really determine if your command executed successfully or not, there are almost no "error" conditions. You should be able to turn on verbose logging and capture that. There may be something surprising happening there...