|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now! |
|
#1
|
|||
|
|||
|
Hi,
Can someone please post me a way of converting a hex number to it's decimal equvalent using perl. In a UNIX shell script, I would have a variable set. eg. hex_nbr="A" .....and then I would like perl to take this variable as input and output a new variable with decimal equivalent. ie. dec_nbr="10" Regards, Adam |
|
#2
|
|||
|
|||
|
you can...
$dec_nbr = hex("A"); hex() converts hex to decimal. |
|
#3
|
|||
|
|||
|
Thanks - works like a charm!
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > how to convert a number from hex ==> decimal? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|