I guess I am the only one, but I was not able to successfully run the script. I get a error "Unrecognized character \xAD at test.pl line 4." when I execute it. I am not a Perl programmer but I need to convert a file from hex to chars. Any idea why?
Thanks
Dan
This is probably the wrong thread ... check out
converting hex to char instead. Also, the following might be more
helpful for what you need:
use strict;
use warnings;
print char2hex('a'),$/;
print hex2char(62),$/;
sub char2hex {
return sprintf('%x',ord($_[0]));
}
sub hex2char {
return chr(hex($_[0]));
}