$_ = "\000japh\njareh\000"; s/([^\040-\177])/sprintf "\\x{%02x}",ord($1)/eg; print;