[Israel.pm] hex conversion

Gabor Szabo gabor at perl.org.il
Tue Feb 3 01:36:21 PST 2004


On Tue, 3 Feb 2004, Prager, Mark wrote:

> Hi all -
> I am still writing newbie Perl scripts.
> How can I convert a hex 4 digit val to a decimal easily.
>
> e.g.
> $hexval="1234";
> $decval= something($hexval); # should be 4660
>


s/something/hex/
should work





I mean
$decval = hex($hexval);




perldoc -f hex




Gabor




More information about the Perl mailing list