in reply to convert scalar to wide hexadecimal value? how?

Try s/<U\+([a-fA-F\d]+)>/chr hex $1/eg. (In Perl regexes < has no special meaning, so you can omit the backslash before it. If you want a word boundary, use \b instead.)

Replies are listed 'Best First'.
Re^2: convert scalar to wide hexadecimal value? how?
by JavaFan (Canon) on Jan 14, 2009 at 13:07 UTC
    The pattern of your suggestion is almost the same as my second suggestion - except that you're using \d instead of 0-9. As a result, your solution is going to try change: "<U+٣٢>"

    But the result isn't what you hope for. Unfortunally, \d matches hundreds of characters functions and operators dealing with (hex)numbers cannot deal with.