> Hi,
> Thanks for the help.
> I also had another doubt how do i handle hex numbers like if  
> i have a 
> variable as $var = ff how do i get  255 , also if I and 8F  
> to 0F can I get 
> 0F ?
> 
> sincerely
> Sachin
>

Please always reply to the group. 
if your $var contains the string ff, you can print to decimail like this:
$var = ff;
$dec = hex($var);
print $dec;

or if you have $var contain an actual hex num string:
$x = 0xff;
print $x;
perl will print the dec value automatically.

even better you can use sprintf and pack, unpack to do these kind of things

$x = 0xff;
$dec = sprintf("%d", $x);
print $dec;

---



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to