On Aug 9, Binish A R said:
perl -le '$d = pack('B8' x 2, "01010110"); print $d'
But its giving me only A ...
When you say pack("B8B8", ...), Perl is expecting TWO additional arguments
to pack(), not just ONE.
$str = pack("B8 B8", "0101", "0110");
returns "AB".
You could
Binish A R wrote:
> Binish A R wrote:
>
>> I've a bit string something like
>> 1100110100111
>> which is the bit representation of A and B together.
>>
>> How can I use unpack/pack to get this characters back?
>
> oops small mistake .. the bit representation for AB together is
> 010101000
Binish A R wrote:
I've a bit string something like
1100110100111
which is the bit representation of A and B together.
How can I use unpack/pack to get this characters back?
oops small mistake .. the bit representation for AB together is
01010110.
Going thru perlpacktut, I t