in reply to Converting decimal value to hex

I think I'm going to have to resort to unpack the $name =~ s/\s+$// works 75% of the time and then the script messes up again. I think unpack will give me exactly what I'm looking for so I can see what characters are causing the problem.