Like all puddings, gray oozes leave a glob instead of a corpse. This can be eaten like a corpse, and may become tainted, but never fully rots away. The glob is acidic and has a chance of conveying fire, cold, or poison resistance.
By the time you encounter a gray ooze, you should be more than capable of defeating it easily, unless you are a Tourist. Its rusting attack and ability to pass under doors makes this monster more annoying than dangerous.
It's best to take gray oozes out with ranged attacks as they are very slow, if not persistent. If you lack the means to kill it from afar and don't want to expend a wand's charge on it, let your pet deal with it. If all else fails, you could punch it to death after unequipping all iron equipment. Only do this if it is safe to do so, i.e. there aren't any other monsters nearby.
In NetHack 3.4.3 and earlier, gray oozes left a corpse instead of a glob when killed.
In NetHack 3.6.0, globs could not give resistances when eaten. This was fixed in 3.6.1.