How can I display a number in dual representation, e.g. 29 --> 11101?
[email protected] (Detlef Lindenthal) Fri, 04 Mar 2005 12:28:43 +0100
| Newsgroups | perl.macperl |
|---|---|
| Message-ID | <[email protected]> |
What would be the easiest way to display a number as dual / binary number?
For example: 29 is to be displayed as 11101.
In PHP this would work:
<?
printf ("%b", 29);
?>
but not so in Perl.
Any idea?
Detlef Lindenthal