On 11/10/06, John W. Krahn <[EMAIL PROTECTED]> wrote:
$string =~ s/([^\x20-\x7f])/ sprintf '\x%02x', ord $1 /eg;
John
--
Thanks!
I figured slightly similar code after reading of
http://library.n0i.net/programming/perl/re_gex/#dynamic substitution
If anyone got another solution put it here
ble' characters in string to ansi hex escapes (\xxx)
and returns new string. Maybe there is some standard function for this
purpose, which I missed. Or maybe with regular expression it's possible to
do it as one-liner.
Any hints?
Regards,
R. Wajda