[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting a String of bits into a binary number in perl?


I think that you want to use pack or unpack.  Make sure that you get the 
templates right.  Those are tricky functions.

Rhett

On Sun, 4 Mar 2007, Deepak Mallya wrote:

> Hi,
>     Can anyone tell me how do I convert a String of bits into a binary
> number in Perl
> 
> For eg:- $a="100";  I want to convert this into perl's interpretation of
> binary no ie $a=0b100
> 
> 
> Thanks,
> Deepak
> 


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.