Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello fellow monks
For outputting some special characters i need to convert
decimal nos to hexadecimal(the hex value has to be
given to the page so the special character appears).
I dont have a idea how to do it using perl.
Any suggestions accepted.
Thanks

Replies are listed 'Best First'.
Re: TO hexadecimal
by zengargoyle (Deacon) on Feb 07, 2003 at 08:46 UTC
    perl -e 'printf "%x\n", 42'

    there's also sprintf and pack. 'perldoc -f sprintf' will get you the docs.