perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rhett Creighton <rh...@creighton.com>
Subject Re: Converting a String of bits into a binary number in perl?
Date Sun, 04 Mar 2007 22:47:04 GMT
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
> 


Mime
View raw message