my $var = "\\u8195\\'20";
if ($var =~ /^\\u(.*)\\/){
   print '&#x' . sprintf("%x", $1 . ';');
}

On Wed, 28 Aug 2002 20:44:32 -0400, [EMAIL PROTECTED] (Paul
Tremblay) wrote:

>Is there a way to convert a decimal number to a hexidecimal number in
>perl? 
>
>I have expressions like this:
>
>\u8195\'20
>\u9824\'3f
>
>The number after the u is a decimal number that needs to be converted
>to hexidecail. The number after the second slash needs to simply be
>elimianted. Thus, the two lines above should look like:
>
> 
>♠
>
>Thanks
>
>Paul


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to