On Aug 9, Binish A R said:

perl -le '$d = pack('B8' x 2, "0100000101000010"); 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", "01000001", "01000010");

returns "AB".

You could juse use "B*".

--
Jeff "japhy" Pinyan         %  How can we ever be the sold short or
RPI Acacia Brother #734     %  the cheated, we who for every service
http://japhy.perlmonk.org/  %  have long ago been overpaid?
http://www.perlmonks.org/   %    -- Meister Eckhart

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to