codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  hex code of a number  perl2user at 15:11 on Thursday, January 15, 2009
 

Hi,
i'd like to know how to get hex code of a number.
Ex: 97 => 61

cvv3@yahoo.com

  Re: hex code of a number  hermanningjaldsson at 12:20 on Friday, January 16, 2009
 

correct me if i'm wrong but it seems like converting hex->number is not preinstalled on perl.

its quite easy to find code that does this though.



  Re: hex code of a number  S_Flex at 12:24 on Friday, February 27, 2009
 

there are many ways to do that here is one way.

my $The_Number = 97;
$hex = unpack("H*", pack("N", $The_Number));
print $hex;
print "\n";
print hex($hex); # back to original

  Re: hex code of a number  perl2user at 14:31 on Saturday, February 28, 2009
 

thx, it was helpfull :=)








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  reading xml embedded in HTML with JavaScript.
•  how to convert wav file to text file
•  html code running php function
•  Re: NEWBIE in need of help.
•  Converting a Long to Date time
•  How do I pass javascript cart variables to asp email body?
•  How do I pass javascript cart variables to asp email body?
•  Converting 8 byte hex value to datetime value
•  Re: perl \ query


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2009