-----Original Message-----
> ... all text strings are in ASCII format like 
> "\x63\x75\x73\x74\x6f\x6d". 
>
> Anyone know of an easy way to unencode the ASCII text parts?

Without getting too fancy, you could try something like this:

-----8<----- unencode_ascii.pl ----->8-----
use strict;
use warnings;

for (<DATA>) {
    s/\\x([0-9a-fA-F]{2})/pack("C",hex($1))/ge;
    print;
}

__DATA__
print "\x63\x75\x73\x74\x6f\x6d";
-----8<---------- Output ----------->8-----
print "custom";
-----8<----------------------------->8-----

Chris
----------------------------------------------------------------------
LEGAL NOTICE
Unless expressly stated otherwise, this message is confidential and may be 
privileged.  It is intended for the addressee(s) only.  Access to this E-mail 
by anyone else is unauthorized.  If you are not an addressee, any disclosure or 
copying of the contents of this E-mail or any action taken (or not taken) in 
reliance on it is unauthorized and may be unlawful.  If you are not an 
addressee, please inform the sender immediately.
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to