Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: How to convert octal non printable chars in a string?

by kennethk (Monsignor)
on Jun 27, 2013 at 14:47 UTC ( #1041032=note: print w/ replies, xml ) Need Help??


in reply to How to convert octal non printable chars in a string?

See the discussion at How can I safely unescape a string., revealed to me by Brother Google. Short answer:

$string =~ s/\\([0-7]+)/chr oct $1/eg;
See oct; chr; Search and replace in perlretut (search for s///e); and g in perlre for details.

#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.


Comment on Re: How to convert octal non printable chars in a string?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2014-11-25 22:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (160 votes), past polls