Well, I'm not sure I'm getting what you're getting at. First of all, the call_f2 sub is entirely superfluous. Now you're comment says that you're trying to print 100. I'm not sure what that means. If you want to print $num in base-10, you should be able to just print it out. If you want to print it in hex (base-16), try:
yes I am familiar with printf function. But I can not do that.
Beccause the function that takes $chr is *FIXED*, and I can not change it.
So what I want is a function that:
# takes a hex number 0xff
# returns string "ff" and NOT 255