This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Missing perlfaq chunk.
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Sat, 20 Sep 2003 10:05:38 +0000 (10:05 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Sat, 20 Sep 2003 10:05:38 +0000 (10:05 +0000)
p4raw-id: //depot/perl@21290

pod/perlfaq4.pod

index 53c7d02..7d3a5bc 100644 (file)
@@ -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));