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:
See oct; chr; Search and replace in perlretut (search for s///e); and g in perlre for details.$string =~ s/\\([0-7]+)/chr oct $1/eg;
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
|
---|
In Section
Seekers of Perl Wisdom