From: Rafael Garcia-Suarez Date: Sat, 20 Sep 2003 10:05:38 +0000 (+0000) Subject: Missing perlfaq chunk. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4dfcc30baac9af2364bced02447a6d9d74693f53;p=p5sagit%2Fp5-mst-13.2.git Missing perlfaq chunk. p4raw-id: //depot/perl@21290 --- diff --git a/pod/perlfaq4.pod b/pod/perlfaq4.pod index 53c7d02..7d3a5bc 100644 --- a/pod/perlfaq4.pod +++ b/pod/perlfaq4.pod @@ -239,7 +239,11 @@ Using Bit::Vector: =item How do I convert from decimal to binary -Using unpack; +Using sprintf (perl 5.6+): + + $bin = sprintf("%b", 3735928559); + +Using unpack: $bin = unpack("B*", pack("N", 3735928559));