Re: decimal -> Binary

[email protected] (Daniel Cutter) Wed, 16 Nov 2011 19:49:12 +0100
Newsgroups perl.fwp
Message-ID <[email protected]>
Hasn't anyone noticed that a decimal to binary or whatever conversion
isn't a JAPH by definition, alone because it does anything other than
output the JAPH? With a looser definition it must at least output "Just
another Perl hacker," perhaps on stderr

Daniel Cutter
@_=3D($_=3D"aaceeehhjklnoprrrsttu", q<)411!**.&#)(#'&$!!"!!>);for$a(map{
'.'x(ord($_)-3*11)}$_[1]=3D~m,.,g){s,($a)(.),$1,,$b.=3D$2};$c.=3D"(.{$_})=
"
for(4,7,4,6);@_=3D$b=3D~m,$c,;push@_,"\n";print map{ucfirst}map{$_.$"}@_


Am 16.11.2011 17:57, schrieb Ronald J Kimball:
> On Wed, Nov 16, 2011 at 04:14:57PM +0100, Olof Johansson wrote:
>> On 2011-11-16 09:57 -0500, Ronald J Kimball wrote:
>>> That should be s/0*//, otherwise you'll get the wrong result for numb=
ers
>>> above 2147483647.
>> That should be s/^0*//, otherwise you'll get the wrong result for
>> numbers above 2147483647.
> No, you are wrong.  s/0*// is sufficient, because /0*/ will always matc=
h at
> the start of the string anyway.
>
> Ronald