One way is to use sprintf:
use strict; use warnings; my $bar = 0x100; print foo(sprintf("%x",$bar)); sub foo { return shift() . "abc"; }
You can check out perlfunc for details of this function.
In reply to Re: passing hex argument as string
by pg
in thread passing hex argument as string
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |