Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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

by kennethk (Abbot)
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1041032]
help
Chatterbox?
[Lady_Aleena]: atcroft, the whole link thing might be a question for either or both the CPAN sites. search.cpan is cpansearch@perl. org, and metacpan doesn't have an email addy for the website itself.
Lady_Aleena just followed @metacpan on Twitter.
[atcroft]: I may just post a question about it later. *shrug*

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2017-05-27 04:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?