in reply to Query on Running perl Script in linux

Check for errors using $ssh->error after every call.