[gull] Transtypage en Perl

Christian Kaenzig christian at becool.ch
Wed Jun 24 19:52:38 CEST 2009


On Wednesday 24 June 2009 14:38:03 Frederic Schutz wrote:
> Faehndrich Philippe wrote:
> >> sub bin2dec {
> >>      return unpack("N", pack("B32", substr("0" x 32 . shift, -32)));
> >> }
> >
> > Merci. Superbe et élégant, juste comme on aime.
>
> Je n'ai pas encore réussi à décider si ta réponse était ironique ou non :-)

<troll>
$ python
>>> int("1000101101110",2)
4462
</troll>

;-)

A+,
Christian

-- 
Christian Kaenzig
http://chrisk.name/


More information about the gull mailing list