If ord is returning 0, it is a null, and you can represent the character as \0. Other characters can be represented by \### where the #s are octal digits. You can get the octal representation for some unknown $char by using sprintf "%o", ord($char)
Caution: Contents may have been coded under pressure.