$ perl -le ' > $str = qq{ab\0cd}; > print $str; > print ord for split m{}, $str;' abcd 97 98 0 99 100 $