I assume it is of the pull cord type similar to the ones used for bathroomlights - if so, just change the switch to save any hassle - remeber to turn the electric of first.
if it's just the cord go to a local small diy shop they should have something similar. take the snapped off bit to show them. when changing the cord thats left in the switch turn the mains off completly before unscrewing from the ceiling.