Welcome to the Monastery | |
PerlMonks |
Re: Re: Re: passing hex argument as stringby ysth (Canon) |
on Nov 04, 2003 at 03:37 UTC ( [id://304315]=note: print w/replies, xml ) | Need Help?? |
That's what
does. If $hexnum is 0xdeadbeef, the sprintf will return "deadbeef". (Use %X instead of %x if you want "DEADBEEF".) (updated to correctly say sprintf instead of printf)
In Section
Seekers of Perl Wisdom
|
|