Skrevet av Emne: perl: Convert between decimal and hexadecimal  (Lest 4280 ganger)

ATC

  • Gjest
perl: Convert between decimal and hexadecimal
« på: 27. ſeptember 2008, 18:24 pm »
  • [applaud]0
  • [smite]0
  • What is the simplest way to convert between decimal and hexadecimal?



    ATC

    • Gjest
    [Solved] perl: Convert between decimal and hexadecimal
    « Svar #1 på: 27. ſeptember 2008, 18:24 pm »
  • [applaud]0
  • [smite]0
  • $hexval = sprintf("%x", $decval);
    $decval =  hex($hexval);