[Israel.pm] hex conversion

Prager, Mark Mprager at ndsisrael.com
Tue Feb 3 01:48:39 PST 2004


thanks to all -
I used 
$hexval="1234";
$decval= hex($hexval); # should be 4660

and it worked fine..

mp
|-----Original Message-----
|From: perl-bounces at perl.org.il [mailto:perl-bounces at perl.org.il]On
|Behalf Of Dovalle Yankelovich
|Sent: Tuesday, February 03, 2004 11:42 AM
|To: Perl in Israel
|Subject: RE: [Israel.pm] hex conversion
|
|
|You can use the sprintf function (I know it will work from dec 
|to hex and I think it will work vice versa too)
|
|Regards,
|Dovalle
|
|-----Original Message-----
|From: Prager, Mark [mailto:Mprager at ndsisrael.com]
|Sent: Tuesday, February 03, 2004 11:21 AM
|To: Perl in Israel (E-mail)
|Subject: [Israel.pm] hex conversion
|
|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
|
|Best Regards,
|
|Mark Prager
|I & T Engineer, Project Delivery
|Binyan Mercazim, Room 508
|NDS Technologies Israel Ltd.
|
|
|5A Hamarpe Street
|Har Hotzvim PO BOX 23012
|Jerusalem 912235 Israel
|Tel:+ 972-2-589-4264
|Mob:+ 972-55-66-4264
|Fax:+ 972-2-589-4725
|Url: http://www2.ozin.com/mark
|mailto:mprager at ndsisrael.com
|
|***************************************************************
|********************
|Information contained in this email message is intended only 
|for use of the individual or entity named above. If the reader 
|of this message is not the intended recipient, or the employee 
|or agent responsible to deliver it to the intended recipient, 
|you are hereby notified that any dissemination, distribution 
|or copying of this communication is strictly prohibited. If 
|you have received this communication in error, please 
|immediately notify the postmaster at ndsisrael.com and destroy 
|the original message.
|***************************************************************
|********************
|***************************************************************
|********************
|Information contained in this email message is intended only 
|for use of the individual or entity named above. If the reader 
|of this message is not the intended recipient, or the employee 
|or agent responsible to deliver it to the intended recipient, 
|you are hereby notified that any dissemination, distribution 
|or copying of this communication is strictly prohibited. If 
|you have received this communication in error, please 
|immediately notify the postmaster at ndsisrael.com and destroy 
|the original message.
|***************************************************************
|********************
|
|_______________________________________________
|Perl mailing list
|Perl at perl.org.il
|http://www.perl.org.il/mailman/listinfo/perl
|
|YAPC::Israel::2004
|http://www.perl.org.il/YAPC/2004/
|
|_______________________________________________
|Perl mailing list
|Perl at perl.org.il
|http://www.perl.org.il/mailman/listinfo/perl
|
|YAPC::Israel::2004
|http://www.perl.org.il/YAPC/2004/
|
***********************************************************************************
Information contained in this email message is intended only for use of the individual or entity named above. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the postmaster at ndsisrael.com and destroy the original message.
***********************************************************************************




More information about the Perl mailing list