Once they arrive in the safehouse, the pistol will be replaced with a Katana, and the pistol will be on the ground next to the survivor.
Though under the right circumstances (such as losing their weapon during combat), a ninja or shinobi may have used a Katana. Despite popular belief, the closest thing to a "ninja sword", otherwise known as a ninjatō, may never have existed and is purely theoretical.
Due to their death effects, it is generally advised to melee neither the Boomer (unless there is no choice) nor the Spitter (unless it is possible to move away immediately from the resulting acid splash). All melee weapons, on all difficulties, kill Common Infected and most Special Infected in one hit, aside from the Charger (which takes two-but see point below), the Witch (which takes four), and the Tank (which takes twenty, excluding the Chainsaw). Close combat weapons cause minimal friendly fire damage to the Survivors, even on Advanced and Expert difficulty levels (the Chainsaw is an exception). They have two main drawbacks: a limited reach and (with a few exceptions) relatively long cooldown periods. Unlike Pistols, close combat weapons never need to be reloaded and cannot run out of ammo (excluding the Chainsaw). Melee weapons replace Pistols in the secondary weapon slot.