I only dabbled in Perl enough to do very simple tasks and my knowledge of grep is nearly zero, but I would start by removing the single quotes around the first parameter. Even if they're needed, you shouldn't have to escape them - as in:
$cmd = "grep sysObjectID.0\s+:{1}\s+CISCO-PRODUCTS-MIB! /database/configs/$kind/$device/system";
($stdout,$stderr) = $ssh->cmd("$cmd");
Should "sysObjectID.0" be "$sysObjectID.0"? I'm not sure if the '\s' is a command switch or a part of a regular expression, so I'm over my head with the rest of the command. I think you'd be better off asking this in a Unix/Linux forum. Good luck!