This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Missing perlfaq chunk.
[perl5.git] / 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));