> >> On 13 Mar 2005 11:19:34 -0800,
> >> "tgillitzer" <> said:
>
> > I have a non-fixed length string that contains hex values in
> > a readable format and other text. I need to convert the hex
> > values [..] to thier respective hex value (using pack i
> > would assume).
>
> Err, that's a no-op.
>
> > Lets say the string is: '[FF]test[FF]test[FF]test[FF]'
>
> > I need to convert [..] to the hex value. So, the result
> > would be: '˙test˙test˙test˙' if printed (where ˙ is the hex
> > value converted to ascii of the display font)
>
> But it already *is* a hex value!
No. It is four bytes that represent a single byte that was recieved.
Such as, a single byte of FF is recieved and is displayed as [FF]
instead of ˙. I need to convert it back to the single byte version.
>
> Do you mean:
>
> I have a string containing delimited hexadecimal numerals
> and I want to extract those substrings, and replace them
> with the character, from the current character set, whose
> numeric value is represented by those numerals
>
> ?
>
> If so, you're probably looking for
>
> perldoc -f hex
> perldoc -f chr
>
> hth
> t
|