<?xml version="1.0" encoding="windows-1252"?>
<node id="342" title="perlfunc:hex" created="1999-08-24 18:43:28" updated="2005-08-14 12:31:29">
<type id="119">
perlfunc</type>
<author id="114">
gods</author>
<data>
<field name="doctext">
</field>
<field name="name">

&lt;P&gt;
hex - convert a string to a hexadecimal number

&lt;P&gt;
&lt;HR&gt;
</field>
<field name="synopsis">

&lt;P&gt;
hex 
&lt;FONT SIZE=-1&gt;EXPR&lt;/FONT&gt;

&lt;P&gt;
hex

&lt;P&gt;
&lt;HR&gt;
</field>
<field name="description">

&lt;P&gt;
Interprets 
&lt;FONT SIZE=-1&gt;EXPR&lt;/FONT&gt; as a hex string and returns the corresponding
value. (To convert strings that might start with either 0 or 0x see [perlfunc:oct|oct].) If 
&lt;FONT SIZE=-1&gt;EXPR&lt;/FONT&gt; is omitted, uses &lt;CODE&gt;$_&lt;/CODE&gt;.

&lt;P&gt;
&lt;PRE&gt;    print hex '0xAf'; # prints '175'
    print hex 'aF';   # same
&lt;/PRE&gt;
&lt;HR&gt;
</field>
</data>
</node>
