in reply to concatenate a non-printable character onto an ascii string and inspect the content

Aha: ord seems to solve this:
my $string = '123456'; foreach (my $i=0; $i<length($string); $i++) { printf("%02x ", ord(subs +tr($string,$i,1))); } print "\n";
produces the expected: 31 32 33 34 35 36, but the 0x1c is still a mystery
  • Comment on Re: concatenate a non-printable character onto an ascii string and inspect the content
  • Download Code