Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: concatenate a non-printable character onto an ascii string and inspect the content

by holandes777 (Scribe)
on Sep 20, 2017 at 16:17 UTC ( [id://1199763]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1199763]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-04-20 02:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found