\000 0x00 \0 00000000b or %00 url encoded is a null byte. It is the string terminator in C and can have interesting effects in certain circumstances. Google for perl null byte hack or similar. Your substitution will do the job, although tr/\0//d is faster FWIW.