summaryrefslogtreecommitdiff
path: root/pod/perlfaq4.pod
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-09-20 10:05:38 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-09-20 10:05:38 +0000
commit4dfcc30baac9af2364bced02447a6d9d74693f53 (patch)
treef478e87dc876a2e3ace97d3bf8501a35eccf6b78 /pod/perlfaq4.pod
parent6f0efb172c82e82c39073291db2462e39dbe4104 (diff)
downloadperl-4dfcc30baac9af2364bced02447a6d9d74693f53.tar.gz
Missing perlfaq chunk.
p4raw-id: //depot/perl@21290
Diffstat (limited to 'pod/perlfaq4.pod')
-rw-r--r--pod/perlfaq4.pod6
1 files changed, 5 insertions, 1 deletions
diff --git a/pod/perlfaq4.pod b/pod/perlfaq4.pod
index 53c7d02194..7d3a5bcb5a 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));